一、前言
假如我们写的python程序源码不小心丢了,但是现在需要对源码进行修改,前期代码是封装成pyc文件使用的,此时可反编译pyc文件,得到源码后再优化。
二、安装
pip install uncompyle6
三、cmd下查看使用方法:
cmd输入命令uncompyle6 --help
返回以下结果
Usage:
uncompyle6 [OPTIONS]... [ FILE | DIR]...
uncompyle6 [--help | -h | --V | --version]
Examples:
uncompyle6 foo.pyc bar.pyc # decompile foo.pyc, bar.pyc to stdout
uncompyle6 -o . foo.pyc bar.pyc # decompile to ./foo.pyc_dis and ./bar.pyc_dis
uncompyle6 -o /tmp /usr/lib/python1.5 # decompile whole library
Options:
-o <path> output decompiled files to this path:
if multiple input files are decompiled, the common prefix
is stripped from these names and the remainder appended to
<

最低0.47元/天 解锁文章
4987

被折叠的 条评论
为什么被折叠?



