How sys, inspect, dis, gc, types, importlib, ctypes, multiprocessing, and asyncio bridge Python code to CPython internals.
| Chapter | Title |
|---|---|
| 52 | sys |
| 53 | inspect |
| 54 | dis |
| 55 | gc |
| 56 | types |
| 57 | importlib |
| 58 | ctypes |
| 59 | multiprocessing |
| 60 | asyncio |
52. `sys`sys module fields that expose interpreter state: sys.modules, sys._getframe, sys.getsizeof, and audit hooks.
53. `inspect`inspect.getmembers, signature objects, frame introspection, and source retrieval via linecache.
54. `dis`dis.dis output, Instruction namedtuples, the bytecode iterator API, and reading adaptive specializations.
55. `gc`gc.collect, gc.get_objects, gc.freeze, callbacks, and tuning generational thresholds.
56. `types`types.FunctionType, types.CodeType, types.SimpleNamespace, and dynamic type creation with types.new_class.
57. `importlib`importlib.machinery finders and loaders, importlib.util helpers, and the Python-level import bootstrap.
58. `ctypes`ctypes CDLL and WinDLL, fundamental types, Structure/Union layout, function prototypes, and libffi integration.
59. `multiprocessing`multiprocessing Process creation strategies (fork/spawn/forkserver), shared memory, and the pickle channel.
60. `asyncio`asyncio event loop internals, the coroutine runner, I/O selector integration, and Task scheduling.