Yet another Python .bat wrapper

Oleg Orlov11980884 orlov at diasoft.ru
Tue Oct 22 08:49:55 EDT 2002


"Oren Tirosh" <oren-py-l at hishome.net> wrote in message
news:mailman.1035286349.21970.python-list at python.org...
> It has a header of just one line. All the ugly stuff is at the end.
>
> -------------------------------------------------------------------
> goto ="python"
>
> # Python code goes here
>
> ''' hybrid python/batch footer:
> @:="python"
> @python.exe %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
> @if errorlevel 9009 echo Python may be downloaded from
www.python.org/download
> @rem '''
> -------------------------------------------------------------------
>
>         Oren
>

WindowsXP:
-------------------------------------------------------------------
@D:\Python22\python.exe -x %0 %* && exit

# Python code goes here

import sys
print " ".join(sys.argv)
-------------------------------------------------------------------

Oleg





More information about the Python-list mailing list