Running a python script from the command line in Windows

后端 未结 3 766
忘了有多久
忘了有多久 2021-01-14 02:24

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 Merc
相关标签:
3条回答
  • 2021-01-14 03:04

    Would this work?

    python "DriveLetter:\path\to\sfood.py" "DriveLetter:\path\to\your\project"
    
    0 讨论(0)
  • 2021-01-14 03:07

    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
    ...
    
    0 讨论(0)
  • 2021-01-14 03:10

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

    0 讨论(0)
提交回复
热议问题