[issue7936] sys.argv contains only scriptname
report at bugs.python.org
Wed Sep 15 01:51:49 CEST 2010
Bill Hayes <bhayes84 at yahoo.com> added the comment:
I found this page while encountering the same problem (only one argument, the scriptname, being passed in from the command line), and wanted to post the following workaround. I'm running Vista and using Python 2.6.
In summary I had to have 'python' at the beginning of the command line.
this did not work: c:\>django-admin startproject mysite
this DID work: c:\>python django-admin startproject mysite
Before finding this fix:
I had tried the 'ftype Python.File' and 'assoc .py' commands mentioned in other posts above and gotten the equivalent of 'not found'.
I actually found the correct info in the registry under HKEY_CURRENT_USER, but 'ftype' and 'assoc' don't appear to read from there.
I modified the registry under HKEY_LOCAL_MACHINE, and then I was getting the responses that were claimed to be needed in msg99369 above, but this did NOT fix the problem.
It was after the above that I found the solution - use 'python' at the beginning of the command line and all args are passed in.
(I did not go back and remove the registry edits that I made to prove conclusively that they are not part of the solution, but I doubt that they are.)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list