From 09f364540767212e23bc8262efe179cae70a57fb Mon Sep 17 00:00:00 2001 From: Saniya Maheshwari Date: Thu, 9 Jun 2022 00:01:57 +0530 Subject: 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`. --- docs/userguide/entry_point.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'docs/userguide/entry_point.rst') 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 -- cgit v1.2.1