Quick Answer: How to Run a Python Program in Windows?
Contents Run Your Script Open Command Line: Start Menu -> Run and Type Cmd. Type: C: \Python27\Python. Exe Z: \Code\Hw01\Script. Py. or If Your System Is...
Run your script
- Open Command line: Start menu -> Run and type cmd.
- Type: C:\python27\python.exe Z:\code\hw01\script.py.
- Or if your system is configured correctly, you can drag and drop your script from Explorer onto the Command Line window and press enter.
How do I run a Python program?
A widely used way to run Python code is through an interactive session. To start a Python interactive session, just open a command-line or terminal and then type in python , or python3 depending on your Python installation, and then hit Enter .
How do I run a Python program in Terminal windows?
To get to the command line, open the Windows menu and type “command” in the search bar. Select Command Prompt from the search results. In the Command Prompt window, type the following and press Enter. If Python is installed and in your path, then this command will run python.exe and show you the version number.