反编译python编译好的pyc文件为py文件

可以使用uncompyle6工具

使用pip可以直接安装:

pip install uncompyle6

反编译命令(两种形式):

uncompyle6 xxx.pyc > xxx.py
uncompyle6 -o xxx.py xxx.pyc

示例:

uncompyle6 utils.pyc > utils.py