A .pyc file contains compiled bytecode, which is machine-readable but not human-readable. To turn this into a .py file, you need a decompiler. Use Uncompyle6 (For Python 3.8 and Older)
This comprehensive guide will walk you through the exact concepts, tools, and step-by-step instructions needed to reverse-engineer a Python EXE back to a .py file. Understanding the Architecture of a Python EXE convert exe to py
Modern versions of Python (Python 3.9 through 3.12+) have complex bytecode structures. is a C++ based tool that actively supports modern Python versions. A .pyc file contains compiled bytecode