[Tutor] Getting Started

eryksun eryksun at gmail.com
Thu Dec 19 07:34:50 CET 2013


On Wed, Dec 18, 2013 at 9:28 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>> The "Python Screen" is what opens up when I click the Python button on
>> the desktop.  The book calls it a "console window,
>
> Yes, it's worth getting familiar with it. It provides the ultimate authority
> on things like error messages etc. If all else fails try running your
> programs direct from that window and you will see any output that a GUI
> might hide. But to make it an effective
> development tool there are a bunch of registry flags that
> you need to set. You can read about them by typing 'help cmd'
> in the console itself.

That's assuming the user ran cmd.exe to use its "help" command.
Windows automatically opens a console window for python.exe if the
process doesn't inherit one. That's what I would expect from a desktop
shortcut. It's like running `x-terminal-emulator -e python` on a
Debian Linux system. Except on Windows it's the python executable that
opens the window, not the other way around.

Wonkish:

The window itself is hosted by another process, so multiple console
applications can share the same window. It used to use a thread in the
system process csrss.exe. But with UAC in Vista it got ugly to use a
system process. Windows 7 introduced conhost.exe, running in the
context of the console application. The architecture change is
explained (with pictures!) in the following blog post:

https://blogs.technet.com/b/askperf/archive/2009/10/05/
        windows-7-windows-server-2008-r2-console-host.aspx


More information about the Tutor mailing list