Understand CPython
Learning Path ⋅ Skills: Python, Pointers, Memory Management, Profiling, CPython Source Code, C Extensions, Python Bindings, Memory Mapping, Performance Optimization
![A person sitting on a futon, waving an arm, with CPython themed boxes and the title floating around them](https://files.realpython.com/media/pcl-A-Tourist-Guide-to-the-CPython-Source-Code_Watermarked.33bdd5a9542b.jpg)
Master the internals of Python Learn about pointers, memory management, timers, profiling, CPython source code, C extensions, bindings, and memory mapping. Elevate your Python skills to a deeper level by exploring CPython’s core mechanics and performance optimization.
Understand CPython
Learning Path ⋅ 9 Resources
![Title image for Pointers and Objects in Python (Pointers in Python: What's the Point?)](https://files.realpython.com/media/Pointers-in-Python_Watermarked.d8551f0cd1d2.jpg)
Course
Pointers and Objects in Python
Learn about Python's object model and see why pointers don't really exist in Python. You'll also cover ways to simulate pointers in Python without managing memory.
![Title image for How Python Manages Memory (Memory Management in Python)](https://files.realpython.com/media/How-Does-Python-Memory-Management-Work_Watermarked.716f0a905800.jpg)
Course
How Python Manages Memory
Get ready for a deep dive into the internals of Python to understand how it handles memory management. By the end of this course, you’ll know more about low-level computing, understand how Python abstracts lower-level operations, and find out about Python’s internal memory management algorithms.
![Title image for Python Timer Functions: Three Ways to Monitor Your Code (Python Timer Functions: Three Ways to Monitor Your Code)](https://files.realpython.com/media/Three-Ways-to-Time-Your-Code_Watermarked.8d561fcc7a35.jpg)
Tutorial
Python Timer Functions: Three Ways to Monitor Your Code
Learn how to use Python timer functions to monitor how quickly your programs are running. You'll use classes, context managers, and decorators to measure your program's running time. You'll also learn the benefits of each method and which to use given the situation.
![Title image for Profiling in Python: How to Find Performance Bottlenecks (Profiling in Python: How to Find Performance Bottlenecks)](https://files.realpython.com/media/How-to-Profile-the-Performance-of-Your-Python-Code_Watermarked.d85e91e64471.jpg)
Tutorial
Profiling in Python: How to Find Performance Bottlenecks
Learn how to profile your Python programs using numerous tools available in the standard library, third-party libraries, as well as a powerful tool foreign to Python. Along the way, you'll learn what profiling is and cover a few related concepts.
![Title image for Your Guide to the CPython Source Code (Your Guide to the CPython Source Code)](https://files.realpython.com/media/A-Tourist-Guide-to-the-CPython-Source-Code_Watermarked.5f05a87331ac.jpg)
Tutorial
Your Guide to the CPython Source Code
In this detailed Python tutorial, you'll explore the CPython source code. By following this step-by-step walkthrough, you'll take a deep dive into how the CPython compiler works and how your Python code gets executed.
![Title image for Building a Python C Extension Module (Building a Python C Extension Module)](https://files.realpython.com/media/Extending-Python-With-C_Watermarked.c15d6edd2d82.jpg)
Tutorial
Building a Python C Extension Module
Learn how to write Python interfaces in C. Find out how to invoke C functions from within Python and build Python C extension modules. You'll learn how to parse arguments, return values, and raise custom exceptions using the Python API.
![Title image for Python Bindings: Calling C or C++ From Python (Python Bindings: Calling C or C++ From Python)](https://files.realpython.com/media/Python-Bindings-Overview_Watermarked.d6645cf64bca.jpg)
Tutorial
Python Bindings: Calling C or C++ From Python
What are Python bindings? Should you use ctypes, CFFI, or a different tool? In this step-by-step tutorial, you'll get an overview of some of the options you can use to call C or C++ code from Python.
![Title image for Python mmap: Doing File I/O With Memory Mapping (Python mmap: Improved File I/O With Memory Mapping)](https://files.realpython.com/media/Using-mmap-Library_Watermarked.3e331f6bcc1d.jpg)
Course
Python mmap: Doing File I/O With Memory Mapping
Learn how to use Python's mmap module to improve your code's performance when you're working with files. You'll get a quick overview of the different types of memory before diving into how and why memory mapping with mmap can make your file I/O operations faster.
Continue Learning
Grab a copy of the CPython Internals book to continue your learning journey and unlock the inner workings of the Python language. The book shows you exactly how to compile the Python interpreter from source code, and how you can participate in the development of CPython.
![Title image for CPython Internals: Your Guide to the Python 3 Interpreter (CPython Internals: Your Guide to the Python 3 Interpreter)](https://files.realpython.com/media/cpython-book-3d-shadow.d83200cc6e84.png)
Book
CPython Internals: Your Guide to the Python 3 Interpreter
Unlock the inner workings of the Python language, compile the Python interpreter from source code, and participate in the development of CPython. The "CPython Internals" book shows you exactly how.
Got feedback on this learning path?
Looking for real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!