How do I make a Python .bat executable file?

Kaweh Kazemi kaweh at frodo.sil.at
Mon Dec 27 10:00:38 EST 1999


"Robert Shockley" <vaton at postoffice.pacbell.net> wrote:
> What kind of 'wrapper' is needed to make a python script an executable
> .bat file in Windows? Is the she-bang (#!/...)  line required? I would
> appreciate any help. ~Rob~

maybe this is a litte bit OT, but you could use the PATHEXT environment var.

    PATHEXT=.COM;.EXE;.BAT;.CMD;.PY;.PYW

if you add the python extension(s) to it, you can call every *.py/*.pyw
without extension (like any other executable) from the 'command prompt'.
i've only tested this with NT4/2000.

kaweh





More information about the Python-list mailing list