LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

python

Interpreted general-purpose programming language

TLDR

Run Python script
$ python [script.py]
copy
Start interactive REPL
$ python
copy
Execute code
$ python -c "[print('Hello')]"
copy
Run module
$ python -m [module]
copy
Start HTTP server
$ python -m http.server [8080]
copy
Check syntax
$ python -m py_compile [script.py]
copy

SYNOPSIS

python [options] [script] [args]

DESCRIPTION

python is the interpreter for the Python programming language, executing scripts or starting an interactive REPL session. It supports procedural, object-oriented, and functional programming styles, and is widely used for scripting, web development, data analysis, automation, and scientific computing.When invoked without arguments, it starts an interactive read-eval-print loop for experimentation. With a script file as argument, it compiles and executes the code. The -m flag runs installed modules as scripts, enabling built-in utilities like HTTP servers, JSON formatters, and package management through pip. On many systems, python may refer to Python 2; use python3 explicitly for Python 3.

PARAMETERS

SCRIPT

Python script to run.
ARGS
Script arguments.
-c CODE
Execute code string.
-m MODULE
Run library module.
-i
Interactive after script.
-O
Optimize bytecode.
-V
Show version.
-u
Unbuffered output.

INSTALL

sudo dnf install python3
copy
sudo pacman -S python
copy
sudo apk add python3
copy
brew install python3
copy
nix profile install nixpkgs#python3
copy

CAVEATS

Python 2 vs 3 differences. Use python3 for Python 3.

HISTORY

Python was created by Guido van Rossum in 1991.

SEE ALSO

python3(1), pip(1), pydoc(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid