Run Python code or scripts (alias for python3).
Synopsis
python [-c code | script.py] [args...]
Description
Runs Python via Pyodide, identical to python3. -c executes a code string; otherwise a script file is executed with the remaining arguments available as sys.argv.
Options
-c code Execute the given code string.
Examples
$ python -c 'print(1+1)'
Evaluate a one-line expression.
$ python script.py arg1
Run a script with an argument.
Notes
Backed by Pyodide (Python compiled to WebAssembly); not every CPython C-extension package is available. Use uv to install pure-Python or Pyodide-lockfile packages.
See Also
python3, uv, node