Encapsulate .py and .txt file into .exe file using PyInstaller(使用PyInstaller将.py和.txt文件封装到.exe文件中)
问题描述
我有%2个文件要放入.exe文件中。
其中一个文件是.py,另一个是.txt
我找不到如何获取多个文件并将其转换为可执行文件。
请帮帮忙。
推荐答案
您应该将.txt文件放入文件夹,然后将文件夹名称放入<;文件夹&>标记:
pyinstaller --onefile --windowed --add-data "<folder>;<folder>" <filename.py>
这篇关于使用PyInstaller将.py和.txt文件封装到.exe文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!