
1. Command line and environment — Python 3.13.3 documentation
-c <command> ¶ Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code.
cmd — Support for line-oriented command interpreters - Python
2 days ago · The Cmd class provides a simple framework for writing line-oriented command interpreters. These are often useful for test harnesses, administrative tools, and prototypes that will later be wrapped in a more sophisticated interface.
2. Using the Python Interpreter — Python 3.13.3 documentation
1 day ago · The Python interpreter is usually installed as /usr/local/bin/python3.13 on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command:
4. Using Python on Windows — Python 3.13.3 documentation
2 days ago · Windows allows environment variables to be configured permanently at both the User level and the System level, or temporarily in a command prompt. To temporarily set environment variables, open Command Prompt and use the set command:
pdb — The Python Debugger — Python 3.13.3 documentation
2 days ago · Changed in version 3.3: Tab-completion via the readline module is available for commands and command arguments, e.g. the current global and local names are offered as arguments of the p command. You can also invoke pdb …
Modules command-line interface (CLI) — Python 3.13.3 …
2 days ago · The following modules have a command-line interface. ast, asyncio, base64, calendar, code, compileall, cProfile: see profile, difflib, dis, doctest, encodings.rot_13, ensurepip, filecmp, fileinput,...
Installing Python Modules — Python 3.13.3 documentation
1 day ago · The standard packaging tools are all designed to be used from the command line. The following command will install the latest version of a module and its dependencies from the Python Package Index: python -m pip install SomePackage
Parser for command-line options, arguments and subcommands
1 day ago · For a more gentle introduction to Python command-line parsing, have a look at the argparse tutorial. The argparse module makes it easy to write user-friendly command-line interfaces. The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv .
subprocess — Subprocess management — Python 3.13.3 …
1 day ago · subprocess. getstatusoutput (cmd, *, encoding = None, errors = None) ¶ Return (exitcode, output) of executing cmd in a shell. Execute the string cmd in a shell with Popen.check_output() and return a 2-tuple (exitcode, output). encoding and errors are used to decode output; see the notes on Frequently Used Arguments for more details.
os — Miscellaneous operating system interfaces — Python 3.13.3 ...
This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see open(), if you want to manipulate paths, see the os.path module, and if you want to read all the lines in all the files on the command line see the fileinput module.