Python Won’t Take Command Line Arguments – Windows Vista

If you use python via the command line in Windows vista, you’ll notice that it won’t accept command line arguments if you run a script. For example this won’t work: python myscript.py argument1 argument2 Your python script won’t get the arguments. The fix for Windows Vista is:

  1. Get an application called: File Type Doctor
  2. Find the .py extension in the application
  3. Edit the Open action (add it if it doesn’t exist)
  4. Select the right python.exe file for "the application to carry out this action"
  5. put this in for the command line arguments (extactly as show, with the quotations): "%1" %*
Share and Enjoy:
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Facebook
  • Google Bookmarks
  • Technorati
  • Furl
  • Mixx
  • Sphinn
  • StumbleUpon

Filed Under: Development

Tags: , , , , ,

Comments (1)

Chris Harris

May 7th, 2009 at 12:52 am    


Thanks, that worked great.

Leave a reply

Name *

Mail *

Website