Issues running python scripts in Command Prompt (Specifically with command line arguments)?

Posted by dmanatunga on Stack Overflow See other posts from Stack Overflow or by dmanatunga
Published on 2010-03-13T03:31:26Z Indexed on 2010/03/13 3:37 UTC
Read the original article Hit count: 223

Filed under:
|
|

I am trying to run my python scripts in DOS without calling python.exe first. I am specifically doing this in relation to running django-admin.py. I have C:\Python26 and C:\Python26\Scripts in my PATH. However, if I try running django-admin.py by doing:

django-admin.py startproject helloworld

I get the message: Type 'django-admin.py help' for usage.

Now, after some experimentation, I realized the problem is that the secondary arguments to these scripts are not being passed for some reason, since I tried it with a some other python scripts I have. I know I could avoid this problem by simply doing:

python C:\Python26\Scripts\django-admin.py startproject helloworld

But I know it should be possible to run the first command only and get it to work, because I had it working before. I've looked everywhere, and not many places have been helpful so any idea would be useful for me at this point.

© Stack Overflow or respective owner

Related posts about python

Related posts about command-prompt