summaryrefslogtreecommitdiff
path: root/docs/userguide
diff options
context:
space:
mode:
authorSaniya Maheshwari <saniya.mah@gmail.com>2022-06-09 00:01:57 +0530
committerSaniya Maheshwari <saniya.mah@gmail.com>2022-06-09 14:31:06 +0530
commit09f364540767212e23bc8262efe179cae70a57fb (patch)
tree366562218edbae372cc7d30badae5eeb8b547e54 /docs/userguide
parentb559ae31409694df54ae3022793c1180fa4e4802 (diff)
downloadpython-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')
-rw-r--r--docs/userguide/entry_point.rst13
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