Problem

Eryk Sun eryksun at gmail.com
Wed Sep 30 16:52:00 EDT 2020


On 9/30/20, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On Tue, 29 Sep 2020 22:31:18 +0000 (UTC), Ron Villarreal via Python-list
> <python-list at python.org> declaimed the following:
>
>>Tried to open Python 3.8. I have Windows 10. Icon won’t open.
>
> 	What "Icon"?
>
> 	Python is a language interpreter/compiler -- it runs from a command
> prompt/shell. Clicking on a Python SCRIPT might open a shell, which will
> almost immediately close when the script finishes executing

No shell should be executed by a normal .py file association. If it's
running CMD or PowerShell, or any other shell, it's likely a mistake.

Double clicking on an icon for a .py file should run "py.exe" ->
"python.exe" or just "python.exe", assuming .py scripts are configured
to execute by default as opposed to opening in an editor. These are
console applications, which, when executed without an inherited
console session, will automatically create a new console session that
creates a window for the console/terminal user interface. The latter
includes keyboard and mouse input and display of the active screen
buffer. Client applications access the session's input buffer and
screen buffers via console I/O files that are attached to the console
session.  (In Windows 7+, a console session is an instance of
conhost.exe. In Windows 8+, console I/O files are provided by the
ConDrv device, which is implemented by the condrv.sys driver. In
Windows 10, console I/O also supports virtual-terminal ANSI sequences,
which improves API compatibility with terminals on other platforms.)


More information about the Python-list mailing list