[docs] Documentation error: 2.2.2. Executable Python Scripts
Fabrizio Marana
fabrizio.marana at gmail.com
Sat Nov 20 18:05:37 CET 2010
Dear Sir/Madam,
*Bug:
*In section 2.2.2. on page
http://docs.python.org/py3k/tutorial/interpreter.html you mention "On
Windows systems, there is no notion of an “executable mode” ".**
This is wrong. Since Windows NT4 and onwards, there is a notion of a "path
extension", which is similar to the Unix executable mode, but invoked
differently.
*Solution:*
1. Using the GUI:
a. Right-click on "My computer"
b. go to "properties"
c. go to "environment variables" (dependent on the OS: NT 4.0, W2K, XP,
Vista, W7)
d. add the string ";PY" to the end of the existing string
OR
2. Using the Command line (temporary for that command interpreter only until
it is exited)
At the CLI (cmd.exe; commnd.com) ">" type:
SET PATHEXT=%PATHEXT%;.PY
Python executables can now be executed on a command line without
specifically invoking the Python interpreter as the Python installer
automatically associates .py files with python.exe. (Which is a
prerequisite)
*Example:*
C:\Program Files\Python\Tools\Scripts>SET PATHEXT=%PATHEXT%;.PY
C:\Program Files\Python\Tools\Scripts>2to3.py
At least one file or directory argument required.
Use --help to show usage.
HTH,
Fabrizio Marana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20101120/c863c38a/attachment-0001.html>
More information about the docs
mailing list