Logically, you don't need these switches. Outside of py2exe a *.py
Logically, maybe not, but if you have chosen to run Windows instead,
how do you avoid them? An EXE needs to let the OS know, via switches,
if it wants a console or not -- that's all there is to it.
gets a console and can open gui windows, a *.pyw is a pure gui
Not really: you can run either a .py or .pyw mainscript (and other
extensions yet) with either pyhon.exe or pythonw.exe. Which EXE
you choose to run as your interpreter is the one that either gets
a console or doesn't -- because Windows associates a console (or
lack thereof) with an EXE. By default most Python installers set
registry associations of the two extensions .py and .pyw with the
two interpreter executables in question -- that may be what's
confusing you. But that's just a default that determines what
the Windows GUI shell is going to do when you doubleclic a file
with such an extension, etc -- you can still perfectly well run
e.g. a .pyw mainscript with python.exe from a console (e.g. so you
can see error messages, warnings etc in the console window).
program. Why the switches atall? IDK? Thought I'd ask.
The switches let you control what goes on explicitly, just as
you can control it explicitly by choosing one or the other of
the two interpreters (python.exe or pythonw.exe) at a command
prompt. I don't know what you mean by the 'idk' question.
I'm having a little trouble getting a py2exe executable to run on
a machine wo python installed. Just wondered if this has anything to
do with it.
I don't see the connection.
Alex