You cannot extract the code until you know how it was packed. Different packers require different extraction tools. The most common tool for fingerprinting an executable is .
pip install uncompyle6 uncompyle6 main.pyc > main.py convert exe to py
: If the developer used a tool like PyArmor to obfuscate the code, the decompiled output will likely be unreadable or may fail to decompile entirely. You cannot extract the code until you know how it was packed