不过我最近遇到了一个问题,自己打包好的exe文件还在,但是Python源文件不知什么时候被误删了。现在想改动一下功能,重写Python脚本工程量也太大了,怎么办?...请看下文: 作者简介 小小明,数据、Python爱好者。...这里我们选择第13个字节再插入四个字节即可: 然后再执行: uncompyle6 auto_organize_gui.exe_extracted/PYZ-00.pyz_extracted/auto_organize.pyc...目录抽取的pyc文件的前4个字节作基准: pyz_dir = f"{pyc_dir}/PYZ-00.pyz_extracted" for pyc_file in os.listdir(pyz_dir):...= f"{pyc_dir}/PYZ-00.pyz_extracted" for pyc_file in os.listdir(pyz_dir): pyc_file_src = f"{pyz_dir
3、在命令窗口输入: python pyinstxtractor.py xxx.exe ?...4、在目录下生成反编译后的文件:xx.exe_extracted 生成拆解目录如下: --- xxx.exe_extracted -- out00-PYZ.pyz_extracted...- 各种.pyc文件 -- out00-PYZ.pyz -- some -- others -- xxx(注意这些都是没后缀的) 5、PYZ-00.pyz_extracted文件夹内是
居家登录公司系统账号被盗?黑客趁虚而入!腾讯iOA强制验证设备可信,异地办公也能安心!
exe程序打包步骤 cmd 进入要编译的 python 文件所在的文件夹, 然后pyinstaller -F hello.py就好了,hello.py 就是我要打包的文件。...96 INFO: PyInstaller: 3.4 96 INFO: Python: 3.6.8 97 INFO: Platform: Windows-7-6.1.7601-SP1 98 INFO: wrote...library d:\python3.6.8\python36.dll 6288 INFO: Found binding redirects: [] 6294 INFO: Warnings written...6358 INFO: Building PYZ because PYZ-00.toc is non existent 6359 INFO: Building PYZ (ZlibArchive) D:\...pyinstaller\build\hello\PYZ-00.pyz 7000 INFO: Building PYZ (ZlibArchive) D:\pyinstaller\build\hello\PYZ
1、尽量将所有要执行的py文件放在一个大文件夹下(里面允许有多个文件夹) 2、命令行输入pyi-makespec main.py 或者 pyi-makespec -F main.py(main.py为Python...,写完整路径,[‘aaa.py’, ‘bbb.py’, ‘c:\\user\\ccc.py’] a = Analysis(['pin.py'], pathex=['F:\\python_work...= PYZ(a.pure, a.zipped_data, cipher=block_cipher) 第四个参数,datas=[]。...[('C:\\project\\test\\images','images'),('C:\\project\\test\\EventLogs','EventLogs')] datas: 第一个参数是Python...= PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE(pyz, a.scripts,
exe程序打包步骤 cmd 进入要编译的python文件所在的文件夹, 然后pyinstaller -F hello.py就好了,hello.py 就是我要打包的文件。...96 INFO: PyInstaller: 3.4 96 INFO: Python: 3.6.8 97 INFO: Platform: Windows-7-6.1.7601-SP1 98 INFO: wrote...library d:\python3.6.8\python36.dll 6288 INFO: Found binding redirects: [] 6294 INFO: Warnings written...6358 INFO: Building PYZ because PYZ-00.toc is non existent 6359 INFO: Building PYZ (ZlibArchive) D:\...pyinstaller\build\hello\PYZ-00.pyz 7000 INFO: Building PYZ (ZlibArchive) D:\pyinstaller\build\hello\PYZ
1 准备环境 1.1 安装python mac上的python默认版本是python2,如下: hanruikaideMacBook-Pro:local hanruikai$ python Python...hanruikai/eclipse-workspace/build/ReadCreditCardExcel/xref-ReadCreditCardExcel.html 4638 INFO: checking PYZ...4638 INFO: Building PYZ because out00-PYZ.toc is non existent 4638 INFO: Building PYZ (ZlibArchive).../Users/hanruikai/eclipse-workspace/build/ReadCreditCardExcel/out00-PYZ.pyz 5023 INFO: Building PYZ (ZlibArchive...) /Users/hanruikai/eclipse-workspace/build/ReadCreditCardExcel/out00-PYZ.pyz completed successfully.
版本 C:\Python27>python.exe --version Python 2.7.14 C:\Python27> 安装 C:\Python27>python.exe -m pip install...\dist) --workpath WORKPATH Where to put all the temporary work files, .log, .pyz...\command\xref-command.html 3384 INFO: checking PYZ 3384 INFO: Building PYZ because out00-PYZ.toc is non...existent 3387 INFO: Building PYZ (ZlibArchive) C:\Python27\test\build\command\out00-PYZ.pyz 3607 INFO...: Building PYZ (ZlibArchive) C:\Python27\test\build\command\out00-PYZ.pyz completed successfully. 3637
最近在学习PYQT5,感觉还挺有趣的,顺便记录一下自己的打包记录,也就当学习笔记啦,如果刚好也在学习python打包的小伙伴可以学一学哦。 1、准备好打包文件 首先准备好将要打包的工程文件(/夹)。...2、下载安装Pyinstaller 在 cmd 中进入我们当前的python环境中,并进入当前项目的文件夹下: 下载安装Pyinstaller 3、生成.spec文件 .spec文件为安装配置文件...frame_main.py 当做主程序,所以输入如下命令 pyi-makespec frame_main.py 可以看到此时文件夹下生成了一个 frame_main.spec 文件,其内容如下: # -*- mode: python...win_private_assemblies=False, cipher=block_cipher, noarchive=False) pyz...= PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE(pyz, a.scripts,
_core", line 7978, in __init__ File "h:\workspace\project\build\pyi.win32\mrdj\outPYZ1.pyz/wx....Use Python standard logging module So, how do you do logging correctly?...It’s easy, use the standard Python logging module....The variable __name__ is current module name in Python....After Python 2.7, you can load logging configuration from a dict.
原文:教大家一招用Python实时监控自己的女朋友每天上网都在做什么!...library c:\users\suneee\appdata\local\programs\python\python36\python36.dll 11756 INFO: Found binding...11888 INFO: Building PYZ because out00-PYZ.toc is non existent 11888 INFO: Building PYZ (ZlibArchive...) Q:\PyWorkSpace\LearnPython\build\sendemail\out00-PYZ.pyz 12544 INFO: Building PYZ (ZlibArchive) Q:\...PyWorkSpace\LearnPython\build\sendemail\out00-PYZ.pyz completed successfully. 12555 INFO: checking PKG
xlogo.ico main.py 几百行代码,打包后是30M,还是比较大 打开exe后发现图片等资源没打包进去,编辑main.spec文件 修改pathex=[r'D:\gitcode\Python_learning...项目路径 修改datas=[('xlogo.ico', './'), ('qrcode_for_michael.jpg', './') ] 元组内容是(文件相对路径,文件的目录) # -*- mode: python...win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False, ) pyz...= PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE( pyz, a.scripts, a.binaries...程序下载github地址 https://github.com/kobe24o/multiplication_calculation/releases 程序演示视频: 使用python的turtle
一、使用pyinstaller 完成对python程序到可执行文件转换. 官网: http://www.pyinstaller.org/ 下载与操作系统相匹配的版本....不支持python.3 二、将下载的pyinstaller-2.0.zip文件解压,解压后可直接使用。 ...pyinstaller不依赖python,因此不需要放入到 site-packages此目录....win32\MonitorWin32Process\warnMonitorWin32Process.txt 4866 INFO: checking PYZ 4867 INFO: rebuilding...out00-PYZ.toc because out00-PYZ.pyz is missing 4868 INFO: building PYZ out00-PYZ.toc 6252 INFO: checking
技术背景 当我们创建一个python项目,最终的成果如果希望用户能够不依赖于python源代码也能够正常的执行,就会比较的人性化。...6361 INFO: checking PYZ 6361 INFO: Building PYZ because PYZ-00.toc is non existent 6361 INFO: Building...PYZ (ZlibArchive) /home/dechin/projects/2021-python/installer/build/pye/PYZ-00.pyz 6647 INFO: Building...PYZ (ZlibArchive) /home/dechin/projects/2021-python/installer/build/pye/PYZ-00.pyz completed successfully...-00.pyz │ ├── PYZ-00.toc │ ├── Tree-00.toc │ ├── Tree-01.toc │ ├── Tree-02.toc
C:\python36>cd Scripts C:\python36\Scripts>dir 驱动器 C 中的卷是 OS 卷的序列号是 509C-E5D1 C:\python36\Scripts 的目录...DLLs_hashlib.pyd 5211 INFO: Looking for eggs 5211 INFO: Using Python library c:\python36\python36.dll...5297 INFO: checking PYZ 5298 INFO: Building PYZ because out00-PYZ.toc is non existent 5299 INFO: Building...PYZ (ZlibArchive) C:\python36\Scripts\build\nhrp\out00-PYZ.pyz 5814 INFO: Building PYZ (ZlibArchive)...C:\python36\Scripts\build\nhrp\out00-PYZ.pyz completed successfully. 5819 INFO: checking PKG 5820 INFO
,以及如何在这些文件格式之间进行转换~ 1. .py 文件 这是Python最基本的文件格式,.py 文件包含的是Python源代码,几乎所有Python程序员都非常熟悉~ 代码案例 # hello_world.py...对象 • 临时存储数据 优缺点 优点: • 序列化和反序列化非常简单 • 可以存储几乎任何Python对象 缺点: • 不适合长期存储 • 存在安全风险,易受攻击 10. .pyz 文件 .pyz 文件是压缩的...Python程序,可以将多个Python文件打包成一个归档文件~ 代码案例 生成 .pyz 文件: zipapp -o myapp.pyz -m 'mymodule:main' mymodule/ 运行....pyz 文件: python myapp.pyz 常用场景 • 发布单文件应用 • 简化部署 优缺点 优点: • 所有文件打包在一起,方便管理 • 简化分发和部署 缺点: • 不易调试 • 需要支持....pyz 的Python版本 常见文件格式转换 .py 转 .pyc 可以使用Python自带的compileall模块: python -m compileall your_script.py .py
前言Python 是一门强大而灵活的编程语言,然而,在与非技术人员分享 Python 脚本时,他们可能不具备安装 Python 解释器的经验。...它的目标是方便地将Python应用程序分发给没有安装Python解释器的用户,使得Python脚本可以在没有Python环境的系统上运行。...INFO: Building because toc changed2983 INFO: Building PYZ (ZlibArchive) C:\Users\MQiuj\PycharmProjects...\pythonProject\build\20231207\PYZ-00.pyz3257 INFO: Building PYZ (ZlibArchive) C:\Users\MQiuj\PycharmProjects...\pythonProject\build\20231207\PYZ-00.pyz completed successfully.3288 INFO: checking PKG3288 INFO: Building
o PYZ-00.pyzContents of 'PYZ-00.pyz' (PYZ): is_package, position, length, name 0, 17, 2647, '_compat_pickle...这里我写了一个 python 脚本实现这个过程:// 读取从pyz目录抽取的pyc文件的前4个字节作基准pyz_dir = "....# 补全非入口类文件pyz_dir = "main.exe_extracted/PYZ-00.pyz_extracted"for pyc_file in os.listdir(pyz_dir):...Cannot extract PYZ-00.pyz....\print-student\main.exe_extracted\PYZ-00.pyz_extracted> ls\print-student\main.exe_extracted\PYZ-00.pyz_extracted
Python和相关库文件。...Graph cross-reference written to C:\Users\张小胖\Desktop\build\demo\xref-demo.html 7130 INFO: checking PYZ...7130 INFO: Building PYZ because PYZ-00.toc is non existent 7134 INFO: Building PYZ (ZlibArchive) C:\...Users\张小胖\Desktop\build\demo\PYZ-00.pyz 7971 INFO: Building PYZ (ZlibArchive) C:\Users\张小胖\Desktop\build...\demo\PYZ-00.pyz completed successfully. 7989 INFO: checking PKG 7989 INFO: Building PKG because PKG-
pip install pyinstaller $ pip install webssh 准备spec文件 为了使用pyinstaller,需要准备一个spec文件并保存为 “~/myenv/lib/python2.7.../site-packages/webssh/wssh.spec”,内容如下: # -*- mode: python -*- block_cipher = None a = Analysis(['main.py...win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher) pyz...= PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE(pyz, a.scripts,...False, upx=True, runtime_tmpdir=None, console=True ) 打包 $ cd ~/myenv/lib/python2.7
当我们创建一个python项目,最终的成果如果希望用户能够不依赖于python源代码也能够正常的执行,就会比较的人性化。...6361 INFO: checking PYZ 6361 INFO: Building PYZ because PYZ-00.toc is non existent 6361 INFO: Building...PYZ (ZlibArchive) /home/dechin/projects/2021-python/installer/build/pye/PYZ-00.pyz 6647 INFO: Building...PYZ (ZlibArchive) /home/dechin/projects/2021-python/installer/build/pye/PYZ-00.pyz completed successfully...-00.pyz │ ├── PYZ-00.toc │ ├── Tree-00.toc │ ├── Tree-01.toc │ ├── Tree-02.toc