Creating Python "executables" on Windows?

Hrvoje Niksic hniksic at iskon.hr
Tue Aug 8 10:52:19 EDT 2000


"Daniel Dittmar" <daniel.dittmar at sap.com> writes:

> - if you're using the DOS prompt, you can set the environment variable
> PATHEXT to include .py.

How do I do that?  When I try `echo %PATHEXT%', I only get "ECHO is on".
Something like `SET PATHEXT=.py' doesn't seem to do the trick either.

> If Python is properly installed (the command 'assoc .py' prints
> '.py=Python.File'),

`assoc .py' prints "Bad command or file name".

> python scripts can now be placed in your path and will be found.

That would be very cool.  I've installed Python using the installer
provided on www.python.org (py152.exe).  I'm not sure how I missed the
assoc thing.

> From the docs: To use PythonLauncher to start a script named
> 'foo.py', make a copy of PythonLauncher named 'foo.exe' and place it
> somewhere in the path.

That seems similar to the .BAT solution -- two files per script.



More information about the Python-list mailing list