maintain 2 versions of python on my computer

Mike mike at
Sat Jan 16 21:11:09 CET 2010

> That seems overkill. This does pretty much the same thing:
>         @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF
>         import sys
>         print sys.version
>         # raise RuntimeError # uncomment to trigger the 'pause'

Indeed! Must be as close to a "Windows shebang line" as you can get.

In actual use, if/when I want a pause, I typically make a call
raw_input() or msvcrt.getch()

> EOF is a special label which may be used to exist a CMD file without having
> to explicitly define it.

Did not know that; something new for my toolbox!


More information about the Python-list mailing list