Persistent Error: Python was not found

Eryk Sun eryksun at gmail.com
Mon Aug 15 12:46:50 EDT 2022


On 8/15/22, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>
> 	Just double-clicking on the file will run it. The problem is that it
> will open a command shell, run, and then close the command shell UNLESS one
> explicitly codes some sort of "hold" at the end of the program

The console window is a terminal, not a shell. If an application is
flagged as a console app, as is "python.exe", and the process doesn't
inherit a console, the initialization code in kernelbase.dll allocates
a new console session. This could be implemented by the classic
conhost.exe host, or, in Windows 11, by an openconsole.exe session
that's associated with a tab in Windows Terminal. If it's the latter,
Terminal can be configured to keep a tab open after the console
session has ended. The tab will display the exit status of the process
that allocated the console session.


More information about the Python-list mailing list