About 284,000 results
Open links in new tab
  1. When invoking a Python script, what is the difference between …

    Mar 22, 2012 · or whatever path to the python interpreter is used. If it resolves to the same Python interpreter that is called by just. python from the shell command line, there is no difference …

  2. python - What is the purpose of the -m switch? - Stack Overflow

    You must run python my_script.py from the directory where the file is located. Alternatively - python path/to/my_script.py. However, you can run python -m my_script (ie refer to the script …

  3. How to execute Python scripts in Windows? - Stack Overflow

    For a Python script test, create two files: a test.bat and a test-script.py. test.bat looks as follows (the .bat files in Anaconda\Scripts call python.exe with a relative path which I adapted for my …

  4. python - What do -u, -m parameters do? - Stack Overflow

    Aug 29, 2015 · The command python -m timeit "python script" would return the time taken for the script to execute. Quoting from the docs-u. Force stdin, stdout and stderr to be totally …

  5. Activate a virtualenv with a Python script - Stack Overflow

    With the function form, this then allows one to type my-script.py -d env-name, while having it actually do the following: Run ~/bin/_my-script.py (with -d env-name supplied as arguments). …

  6. How to start a python file while Windows starts?

    Dec 14, 2010 · @sam: I don't know what's the startup folder path in Windows 7. What I gave as an example is startup folder for all users. There should exist one for each user, and you can …

  7. windows - Python - How do you run a .py file? - Stack Overflow

    Feb 29, 2012 · Since you seem to be on windows you can do this so python <filename.py>. Check that python's bin folder is in your PATH, or you can do c:\python23\bin\python …

  8. path - Python can't find my module - Stack Overflow

    Nov 23, 2015 · This way, script.py can freely import anything in src, but nothing in src can import script.py. If that's not the case, and script.py really is a part of src, you can use python's -m …

  9. python - Run .py file until specified line number - Stack Overflow

    Apr 27, 2015 · python -m pdb script.py b 15 # <-- Set breakpoint on line 15 c # "continue" -> run your program # will break on line 15 You can then inspect your variables and call functions. …

  10. Using subprocess to run Python script on Windows

    The python.org Windows installer doesn't seem to put the "python" command in PATH, and I think it would have the .exe suffix (which would break the other platforms) – dbr Commented May …