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

  2. how to run python files in windows command prompt?

    I want to run a python file in my command prompt but it does nothing. These are the screen shots of my program i am testing with and the output the command prompt gives me.

  3. run python script directly from command line - Stack Overflow

    I've seen that should make the script runnable from the command line without the need for python programname.py. Unless I'm misunderstanding I should be able to use programname.py as …

  4. python - How do I execute a program or call a system command?

    How do I call an external command within Python as if I had typed it in a shell or command prompt?

  5. Run cmd file using python - Stack Overflow

    Jul 13, 2020 · You don't need to read the cmd file line by line. you can simply try the following: import os os.system('myfile.cmd') or using the subprocess module: import subprocess p = …

  6. python - Run function from the command line - Stack Overflow

    This avoids the weird .pyc copy function that crops up every time you run python -c etc. Maybe not as convenient as a single-command, but a good quick fix to text a file from the command …

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

    Feb 29, 2012 · If this doesn't work, you can create a batch file in the same directory with the following contents: C:\python23\python YOURSCRIPTNAME.py Then double click that batch …

  8. How do I run a Python program in the Command Prompt in …

    Jan 7, 2011 · Python comes with a script that takes care of setting up the windows path file for you. After installation, open command prompt cmd Go to the directory you installed Python in …

  9. Running Python scripts through the Windows Command Line

    Apr 17, 2017 · A correctly installed Python 3.6 should associate .py [w] files with the py.exe launcher and pass command-line arguments. The py launcher handles running multiple …

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

    Nov 6, 2023 · 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.

Refresh