Question: how are pyc files generated?
Answer: pyc are automatically generated by the interpreter when you import a module, which speeds up future importing of that module. These files are therefore only created from a . py file if it is imported by another . py file or module.