PYTHON3(1)

πŸ“¦
version 1.5.54 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ‘‘ PYTHON3 πŸ‘‘

okay so bestie, this page comes straight out of the scalene manual, section 1 β€” the one for the command-line girlies. it's the whole tea on python3 and every flag she'll take from you. grab a snack, we're going through all of it πŸ’…


✨ NAME ✨

python3 β€” Memory Profiler for Python 🫢


🌸 DESCRIPTION 🌸

the vibe check on how you actually call her:

usage: python3 [option] ... [-c cmd | -m mod | file | -] [arg] ...
literally every one of these options also has an environment-variable twin, and she will list them for you, because she's thoughtful like that πŸ’–

πŸŽ€ OPTIONS πŸŽ€

  • -b β€” issue warnings when you convert bytes/bytearray to str, or when you compare bytes/bytearray with str, or bytes with int. (and -bb: issue errors instead, no chill at all πŸ’€)
  • -B β€” don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x
  • -c cmd β€” program passed in as string (terminates option list)
  • -d β€” turn on parser debugging output (for experts only, and it only works on debug builds); also PYTHONDEBUG=x
  • -E β€” ignore PYTHON* environment variables (such as PYTHONPATH)
  • -h β€” print this help message and exit (also -? or --help)
  • -i β€” inspect interactively after running script; forces a prompt even if stdin does not appear to be a terminal; also PYTHONINSPECT=x
  • -I β€” isolate Python from the user's environment (implies -E, -P and -s) πŸ”’
  • -m mod β€” run library module as a script (terminates option list)
  • -O β€” remove assert and __debug__-dependent statements; add .opt-1 before the .pyc extension; also PYTHONOPTIMIZE=x
  • -OO β€” do the -O changes and also discard docstrings; add .opt-2 before the .pyc extension
  • -P β€” don't prepend a potentially unsafe path to sys.path; also PYTHONSAFEPATH
  • -q β€” don't print version and copyright messages on interactive startup
  • -s β€” don't add user site directory to sys.path; also PYTHONNOUSERSITE=x
  • -S β€” don't imply 'import site' on initialization
  • -u β€” force the stdout and stderr streams to be unbuffered; this option has no effect on stdin; also PYTHONUNBUFFERED=x
  • -v β€” verbose (trace import statements); also PYTHONVERBOSE=x. can be supplied multiple times to increase verbosity πŸ—£οΈ
  • -V β€” print the Python version number and exit (also --version). when given twice, print more information about the build πŸ‘€
  • -W arg β€” warning control; arg is action:message:category:module:lineno; also PYTHONWARNINGS=arg
  • -x β€” skip first line of source, allowing use of non-Unix forms of #!cmd
  • -X opt β€” set implementation-specific option
  • --check-hash-based-pycs always|default|never β€” control how Python invalidates hash-based .pyc files
  • --help-env β€” print help about Python environment variables and exit
  • --help-xoptions β€” print help about implementation-specific -X options and exit
  • --help-all β€” print complete help information and exit πŸŽ‰

🫢 ARGUMENTS 🫢

  • file β€” program read from script file
  • - β€” program read from stdin (default; interactive mode if a tty)
  • arg ... β€” arguments passed to program in sys.argv[1:]

and that's the whole thing, bestie, you ate that πŸ“ no notes, main character energy from start to finish ✨ this was python3 1.5.54, dated March 2026, living her best life in section 1 of the scalene manual β€” mwah, take care of her, she's iconic πŸ’œπŸŒˆπŸ’…

πŸ“¦ where this page comes from