About 50 results
Open links in new tab
  1. How to execute Python scripts in Windows? - Stack Overflow

    149 When you execute a script without typing "python" in front, you need to know two things about how Windows invokes the program. First is to find out what kind of file Windows thinks it is: C:\>assoc .py …

  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. Shell Script: Execute a python program from within a shell script

    Here I have demonstrated an example to run python script within a shell script. For different purposes you may need to read the output from a shell command, execute both python script and shell …

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

    python -m myscript from the command line, as long as you have Python installed and on your path environment variable (i.e. set to run with python, which, if installed, would typically be the case). …

  5. 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 line, and …

  6. How can I make a Python script standalone executable to run without …

    Jan 24, 2017 · I'm building a Python application and don't want to force my clients to install Python and modules. So, is there a way to compile a Python script to be a standalone executable?

  7. How to run a python script from IDLE interactive shell?

    Jun 22, 2013 · To run a python script in a python shell such as Idle or in a Django shell you can do the following using the exec () function. Exec () executes a code object argument.

  8. 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 versions of Python …

  9. Run python script with uv with path - Stack Overflow

    Jan 27, 2025 · 5 I'm using uv as my python project manager. Within the project dir I can run my scripts with uv run my_script.py and all dependencies are resolved. But how can I call this script if my …

  10. Activate virtualenv and run .py script from .bat - Stack Overflow

    Nov 22, 2017 · 71 I'd like to use Windows Task Scheduler to run a python script within a virtual environment. I'd like the Scheduler to run a .bat file that will activate the virtualenv run the script …