The py_compile module provides a single function to generate a byte-code file from a source file.
Though not often needed, this function can be useful when installing modules for shared use, especially if some of the users may not have permission to write the byte-code cache files in the directory containing the source code.
+
'c'
('o'
if optimization is enabled in the
current interpreter). If dfile is specified, it is used as
the name of the source file in error messages instead of file.
Más informació en: