About 10,700,000 results
Open links in new tab
  1. python - How to run a .py file in windows command line? - Stack Overflow

    Nov 5, 2013 · I don't have permission to save .py file in python directory (C:\program files\python33) so I saved it to C:\Pyscripts. Also python was already been added to the PATH …

  2. How to Use Windows Command Prompt to Run a Python File - wikiHow

    Mar 22, 2024 · To run a Python file, type “Python File.py” where “File” is your file’s name. For example, if your Python file is named “Script,” type “Python script.py” instead. Press enter to …

  3. How to Run Your Python Scripts and Code

    Running a Python .py script involves using the python command followed by the script’s filename in the terminal or command prompt. Running a .py file in Windows can be done directly from …

  4. How to Run a Python Script in Windows | LearnPython.com

    Nov 21, 2022 · To run the script that we created above, you can call the Python program from the Command Prompt and tell it which file to execute. From the Command Prompt, simply type: …

  5. Execute Python scripts - Python Tutorial

    Execute Python scripts in the terminal or an IDE. Python files have the .py extension. Whenever you make a Python script, save it as name.py. A simple program (hello.py) is shown below. …

  6. Read a File from Command Line Using Python - Online …

    Learn how to read a file from the command line using Python with this comprehensive guide, including examples and explanations.

  7. Running Python Files in the Terminal: A Comprehensive Guide

    Jan 26, 2025 · When you run a Python file in the terminal, the Python interpreter reads the code from the file and translates it into machine-readable instructions that your computer can …

  8. python - how to open and edit py file in command prompt

    Feb 6, 2022 · On the Windows command-line cmd.exe you can use assoc and ftype to manage and alter the associations with a given file-type/-extension: assoc /? ftype /? Note: on …

  9. I want to read in a file from the command line in python

    Sep 16, 2011 · Easy to use for simple scripts: process(line) Then you can do python myscript.py file.txt or even pipe it in. Purrfect! https://docs.python.org/3/library/fileinput.html. If you have …

  10. python - Get a file from CLI input - Stack Overflow

    Mar 1, 2022 · A great option is the fileinput module, which will grab any or all filenames from the command line, and give the specified files' contents to your script as though they were one big …

  11. Some results have been removed
Refresh