]> granicus.if.org Git - python/commitdiff
Better method for associating .py files with the interpreter.
authorGeorg Brandl <georg@python.org>
Tue, 8 Jan 2008 19:42:30 +0000 (19:42 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 8 Jan 2008 19:42:30 +0000 (19:42 +0000)
Doc/using/windows.rst

index 2b52544e045e420f6e57dade31e7e7a382ae0072..1753b6dbca9f3f7956110f7d1599a0110189d83a 100644 (file)
@@ -188,16 +188,17 @@ of your Python installation directory).  This suppresses the terminal window on
 startup.
 
 You can also make all ``.py`` scripts execute with :program:`pythonw.exe`,
-setting this through the usual facilites, for example (names might differ,
-depending on your version of Windows):
+setting this through the usual facilites, for example (might require
+administrative rights):
 
-#. Open the context menu of a :file:`{*}.py` file.
-#. Click :menuselection:`Open with...`.
-#. Choose the interpreter of your choice (utilize :guilabel:`Other...` or
-   :guilabel:`Choose Program...` if it is not in the list of default programs).
-#. Check :guilabel:`Always open files with this program`.
-#. Click :guilabel:`OK`.
+#. Launch a command prompt.
+#. Associate the correct file group with ``.py`` scripts::
+   
+      assoc .py=Python.File
 
+#. Redirect all Python files to the new executable::
+   
+      ftype Python.File=C:\Path\to\pythonw.exe "%1" %*
 
 
 Additional modules