# pyc_compiling

This directory contains small scripts meant to compile python source files to bytecode (`.pyc`) files.
In general, you are able to provide four positional arguments:
1. The path to the source file to compile
2. The path (including the file name) where the compiled file shall be placed
3. The optimization level as a single integer between -1 and 3, with -1 being "automatic" mode, 0 being lowest optimization and 3 being highest optimization
4. The invalidation mode as a single integer according to `py_compile.PycInvalidationMode`

For python <3.7, invalidation mode is not supported (and will be ignored), as the only existing invalidation mode is timestamp invalidation.
For python <3.1, optimization mode cannot be manually set, and is automatically set to "the optimization mode of the interpreter" (which is equal to manually setting it to "-1" in later python versions).

Superfluous arguments are silently ignored.

The scripts create no output to `stdout`, they only place the compiled file at the given path.
Compilation errors do not cause the script to exit with a non-zero exit code, so the existence of the expected file has to be manually checked.
