maintain 2 versions of python on my computer
gklein at xs4all.nl
Sat Jan 16 14:40:11 CET 2010
Alf P. Steinbach wrote:
>* Gertjan Klein:
>> What I've been thinking about is to write a single [Windows] executable that
>> gets associated with .py and .pyw (instead of python.exe itself).
>Well, you need two: one for console subsystem, and one for GUI subsystem.
Why? I'd have imagined writing something for the GUI subsystem (without
actually creating a GUI, just to prevent a DOS box popping up), creating
the proper commandline, with either python.exe or pythonw.exe, and
launching that as a separate process. (I have no idea whether this would
actually work though -- I'm just thinking out loud at this stage.)
Thinking about it some more, perhaps that way I can't get at return
codes a python script might provide. I haven't used those, but they may
be useful at some point.
>If it's OK with C++, I just sat down and wrote this.
Thanks for that. I won't be using it though; I don't know C++ at all,
and the source looks like complete gobbledygook to me. I wouldn't know
where to begin to change anything in it. ;-)
More information about the Python-list