diff options
author | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-06-09 00:01:57 +0530 |
---|---|---|
committer | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-06-09 14:31:06 +0530 |
commit | 09f364540767212e23bc8262efe179cae70a57fb (patch) | |
tree | 366562218edbae372cc7d30badae5eeb8b547e54 /docs/userguide/entry_point.rst | |
parent | b559ae31409694df54ae3022793c1180fa4e4802 (diff) | |
download | python-setuptools-git-09f364540767212e23bc8262efe179cae70a57fb.tar.gz |
Added note on distinction between `console_scripts` and `gui_scripts`
This note has been taken from the Python Packaging user guide. I think
it will be of interest to users who want to understand what is the
difference between `console_scripts` and `gui_scripts`.
Diffstat (limited to 'docs/userguide/entry_point.rst')
-rw-r--r-- | docs/userguide/entry_point.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index 3f5e5261..f2dd7863 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -160,6 +160,16 @@ Now, running: will open a small application window with the title 'Hello world'. +.. note:: + + The difference between ``console_scripts`` and ``gui_scripts`` only affects + Windows systems. [#packaging_guide]_ ``console_scripts`` are wrapped in a console + executable, so they are attached to a console and can use ``sys.stdin``, + ``sys.stdout`` and ``sys.stderr`` for input and output. ``gui_scripts`` are + wrapped in a GUI executable, so they can be started without a console, but + cannot use standard streams unless application code redirects them. Other + platforms do not have the same distinction. + .. _dynamic discovery of services and plugins: Advertising Behavior @@ -248,3 +258,6 @@ installed. Support for specifying package metadata and build configuration options via ``pyproject.toml`` is experimental and might change in the future. See :doc:`/userguide/pyproject_config`. + +.. [#packaging_guide] + Reference: https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts |