About 308,000 results
Open links in new tab
  1. 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 …

  2. How to execute a file within the Python interpreter?

    Jun 22, 2009 · I'm trying to execute a file with Python commands from within the interpreter. I'm trying to use variables and settings from that file, not to invoke a separate process.

  3. How to run a Python file in Visual Studio code from the terminal?

    Nov 28, 2022 · Open the folder using VS Code: File -> Open Folder Create your script and save it in the folder Open a new terminal: Terminal -> New Terminal Type the command: python …

  4. komodo ide - How do I run a Python program? - Stack Overflow

    The command py -3 file.py always works for me, and if I want to run Python 2 code, as long as Python 2 is in my path, just changing the command to py -2 file.py works perfectly.

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

    Additionally, if you want to be able to run your python scripts without typing the .py (or .pyw) on the end of the file name, you need to add .PY (or .PY;.PYW) to the list of extensions in the …

  6. How to run a .py file in windows command line? - Stack Overflow

    Nov 5, 2013 · I have written a simple python program using IDLE to run it from command line. I don't have permission to save .py file in python directory (C:\program files\python33) so I …

  7. How to run script with elevated privilege on windows

    Jul 20, 2016 · Next I checked "run as administrator" on the "compatibility tab" of the shortcut. When the shortcut is executed, you get a prompt asking permission to run the script as an …

  8. How can I make one python file run another? - Stack Overflow

    How can I make one python file to run another? For example I have two .py files. I want one file to be run, and then have it run the other .py file.

  9. How to run .py script from anywhere in command line (windows)

    I can run the .py file if I enter the full path name in cmd, but I was hoping that I can be anywhere in cmd and run it regardless. I.e. Say the script is saved in "C:\MyDocuments\Python\Scripts …

  10. How to use Anaconda Python to execute a .py file?

    Oct 12, 2016 · However, I am having trouble executing .py files using the command prompt. How can I get my computer to understand that the python.exe application is in the Anaconda folder …