pypy¶
SYNOPSIS¶
pypy [options]
[-c cmd|-m mod|file.py|-]
[arg…]
OPTIONS¶
- -i
Inspect interactively after running script.
- -O
Skip assert statements.
- -OO
Remove docstrings when importing modules in addition to
-O.- -c CMD
Program passed in as
CMD(terminates option list).- -S
Do not
import siteon initialization.- -s
Don’t add the user site directory to sys.path.
- -u
Unbuffered binary
stdoutandstderr.- -h, --help
Show a help message and exit.
- -m MOD
Library module to be run as a script (terminates option list).
- -W ARG
Warning control (arg is action:message:category:module:lineno).
- -E
Ignore environment variables (such as
PYTHONPATH).- -B
Disable writing bytecode (
.pyc) files.- -X track-resources
Produce a
ResourceWarningwhenever a file or socket is closed by the garbage collector.- --version
Print the PyPy version.
- --info
Print translation information about this PyPy executable.
- --jit ARG
Low level JIT parameters. Mostly internal. Run
--jit helpfor more information.
ENVIRONMENT¶
PYTHONPATHAdd directories to pypy’s module search path. The format is the same as shell’s
PATH.PYTHONSTARTUPA script referenced by this variable will be executed before the first prompt is displayed, in interactive mode.
PYTHONDONTWRITEBYTECODEIf set to a non-empty value, equivalent to the
-Boption. Disable writing.pycfiles.PYTHONINSPECTIf set to a non-empty value, equivalent to the
-ioption. Inspect interactively after running the specified script.PYTHONIOENCODINGIf this is set, it overrides the encoding used for stdin/stdout/stderr. The syntax is encodingname:errorhandler The errorhandler part is optional and has the same meaning as in str.encode.
PYTHONNOUSERSITEIf set to a non-empty value, equivalent to the
-soption. Don’t add the user site directory to sys.path.PYTHONWARNINGSIf set, equivalent to the
-Woption (warning control). The value should be a comma-separated list of-Wparameters.
PYPYLOGIf set to a non-empty value, enable logging, the format is:
- fname or +fname
logging for profiling: includes all
debug_start/debug_stopbut not any nesteddebug_print. fname can be-to log to stderr. The +fname form can be used if there is a : in fname:fnameFull logging, including
debug_print.- prefix
:fname Conditional logging. Multiple prefixes can be specified, comma-separated. Only sections whose name match the prefix will be logged.
PYPYLOG=jit-log-opt,jit-backend:logfilewill generate a log suitable for jitviewer, a tool for debugging performance issues under PyPy.PYPY_IRC_TOPICIf set to a non-empty value, print a random #pypy IRC topic at startup of interactive mode.
several environment variables:
PYPY_GC_NURSERYThe nursery size. Defaults to 1/2 of your last-level cache, or
4Mif unknown. Small values (like 1 or 1KB) are useful for debugging.PYPY_GC_NURSERY_DEBUGIf set to non-zero, will fill nursery with garbage, to help debugging.
PYPY_GC_INCREMENT_STEPThe size of memory marked during the marking step. Default is size of nursery times 2. If you mark it too high your GC is not incremental at all. The minimum is set to size that survives minor collection times 1.5 so we reclaim anything all the time.
PYPY_GC_MAJOR_COLLECTMajor collection memory factor. Default is
1.82, which means trigger a major collection when the memory consumed equals 1.82 times the memory really used at the end of the previous major collection.PYPY_GC_GROWTHMajor collection threshold’s max growth rate. Default is
1.4. Useful to collect more often than normally on sudden memory growth, e.g. when there is a temporary peak in memory usage.PYPY_GC_MAXThe max heap size. If coming near this limit, it will first collect more often, then raise an RPython MemoryError, and if that is not enough, crash the program with a fatal error. Try values like
1.6GB.PYPY_GC_MAX_DELTAThe major collection threshold will never be set to more than
PYPY_GC_MAX_DELTAthe amount really used after a collection. Defaults to 1/8th of the total RAM size (which is constrained to be at most 2/3/4GB on 32-bit systems). Try values like200MB.PYPY_GC_MINDon’t collect while the memory size is below this limit. Useful to avoid spending all the time in the GC in very small programs. Defaults to 8 times the nursery.
PYPY_GC_DEBUGEnable extra checks around collections that are too slow for normal use. Values are
0(off),1(on major collections) or2(also on minor collections).PYPY_GC_MAX_PINNEDThe maximal number of pinned objects at any point in time. Defaults to a conservative value depending on nursery size and maximum object size inside the nursery. Useful for debugging by setting it to 0.
SEE ALSO¶
python(1)