Context is that my Python 3.9 source code files were deleted.
Earlier, I forgot to add .gitignore
in my repository root of my Python Django Project and I committed the code to my github repository. Now the root folder contains __pycache__
, where all the compiled python files are located. I tried looking at, how to decompile the files and found the required resource uncompyle6 on PyPI. However, it works for Python 2.4 - 3.8
. In addition, there is a Python decompiler decompyle3 for Python 3.7 - 3.8
which is stripped down from uncompyle6. But the version of Python I have been using all along is Python 3.9.
Is there a way I can get around this and be able to solve my problem of decompiling my .py files anyhow so I can get the earlier project structure that I require?
Edit: unpyclib and Decompyle++ are another tools that I looked into, however both are Python 2.xx only programs. The most successful decompiler is uncompyle6(offering support upto Python 3.8
as of now) as is quite evident from several other responses on stackoverflow.