greye
greye

Reputation: 9141

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:

Now, the documentation doesn't say anything else rather than: sfood /path/to/my/project

I can't get this command to work. What am I missing?

Upvotes: 4

Views: 3898

Answers (3)

Noob Saibot
Noob Saibot

Reputation: 4749

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
...

Upvotes: 1

Matthew Iselin
Matthew Iselin

Reputation: 10670

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".

Upvotes: 1

Gabriel Hurley
Gabriel Hurley

Reputation: 40052

Would this work?

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

Upvotes: 4

Related Questions