.pyw files

Kevin Altis altis at semi-retired.com
Thu Jan 30 13:56:40 EST 2003


"Tim Peters" <tim.one at comcast.net> wrote in message
news:mailman.1043942166.26656.python-list at python.org...
> [Skip Montanaro]
> > If I understand correctly, .pyw files on Windows are plain old
> > source files,
>
> Yes.
>
> > but prevent console window popup when executed.
>
> Due to file association magic:  .py is associate with python.exe, and .pyw
> with pythonw.exe.  There's nothing like pythonw.exe on, e.g., a Linux box.
> You could get the same effect with a .py file by running it with
pythonw.exe
> instead of with python.exe.  The entire difference is that python.exe uses
> the main() in Module\python.c, but pythonw.exe compiles WinMain() in
> PC\WinMain.c instead.
>
> > Do they byte compile to .pyc files?
>
> If imported, yes.

I thought .pyw got compiled to .pywc and an optimized compile would be
.pywo? That is based on the default being to just append 'c' or 'o' to the
original extension. Has that changed or am I remembering incorrectly?

ka






More information about the Python-list mailing list