Skip to content Skip to sidebar Skip to footer

Running A Python Script From The Command Line In Windows

I'm trying to run SnakeFood, to analyze a python project. I'm on a Windows machine and so far I've been able to figure out how to: install Tortoise for Mercurial to download the S

Solution 1:

Would this work?

python "DriveLetter:\path\to\sfood.py""DriveLetter:\path\to\your\project"

Solution 2:

Considering the documentation says "sfood /path/to/my/project" it most likely assumes a *nix environment. That leads me to the assumption that sfood probably has a shebang line.

On Windows you probably need to use "python sfood ". If "sfood" isn't in your PATH, you'll need to write the full path rather than just "sfood".

Solution 3:

I was able to resolve this issue, on my Windows 7 machine with Python 2.7.3 installed, like so:

C:\> cd \path\to\snakefood\installation\folder
C:\path\to\snakefood\installation\folder> python setup.py install
...
C:\path\to\snakefood\installation\folder> cd C:\Python27\Scripts
C:\Python27\Scripts> python sfood \path\to\my\project
...

Post a Comment for "Running A Python Script From The Command Line In Windows"