__pycache__/module.version.pyc Files

This section provides a quick introduction to the __pycache__/module.version.pyc file. which is a binary file created by the Python system to store the compiled version of the given module file.

What Is a __pycache__/module.version.pyc File? A __pycache__/module.version.pyc file is a binary file created by the Python system to store the compiled version of the given module file.

The Python system uses the __pycache__/module.version.pyc file to avoid compiling the same module file again, if the same module file is requested to be loaded again the next time.

Here is an example of a __pycache__/module.version.pyc file left after the execution of the "import module_test" statement.

herong$ python

>>> import module_test
Hi there! - from 'module_test' module
Welcome on board! - from 'first' class

>>> module_test.version
"1.00 - from 'version' attribute"

>>> exit()

herong$ tree .
    module_test.py
    __pycache__/
          module_test.cpython-38.pyc

Don't worry, if you have accidentally deleted the __pycache__/module.version.pyc file. The Python system will create it again, when the module file is loaded again.

Table of Contents

 About This Book

 Running Python Code Online

 Python on macOS Computers

 Python on Linux Computers

 Built-in Data Types

 Variables, Operations and Expressions

 Statements - Execution Units

 Function Statement and Function Call

 Iterators, Generators and List Comprehensions

 Classes and Instances

Modules and Module Files

 What Is Module

 "import module" - Two-Step Process

 sys.modules - Listing Loaded Modules

 importlib.reload(module) - Reloading Module

 What Are Module Members

 "from module import member" Statement

 "from module import *" Statement

 What Is __all__ List

__pycache__/module.version.pyc Files

 What Is the __main__ Module

 Packages and Package Directories

 "sys" and "os" Modules

 "pathlib" - Object-Oriented Filesystem Paths

 "pip" - Package Installer for Python

 SciPy.org - Python Libraries for Science

 pandas - Data Analysis and Manipulation

 Anaconda - Python Environment Manager

 Jupyter Notebook and JupyterLab

 References

 Full Version in PDF/EPUB