1.6. Starting a Python Application from Windows ExplorerΒΆ

Here are some notes on how to configure Windows XP (sorry, not Windows Vista) to run a Python application by clicking on the program in Windows explorer and having it run in DOS window that does not exit when the program finishes.

  1. open Windows Explorer (winKey-E)

  2. From the Tools tab, select Folder Options

  3. File types

  4. Scroll down and select py extension

  5. At the bottom, click on Advanced

  6. Click on New

  7. Fill in the fields as follows [1]

    Action:  Run in Window
    Application to Use: "C:Python26\python.exe"-i "%1" %*
  8. Click on Use DDE

  9. Under DDE:

    Application: Python
    Topic: System
  10. click OK

Note

This does not work is Windows Vista. Microsoft has removed the ability to define new actions for file types.

Footnotes

[1]The Application specification here is almost the same as what is in the open option, except -i is added

Previous topic

1.5. Wing-101

Next topic

1.7. Installation of Python Packages

This Page