问题描述
例如:
#some code up here to set some things up
def oneFunction(param):
#does something here as well
def run():
varaible1 = input()
oneFunction(variable1)
#more code after this
if something == True:
#some code to create executable from the run function
else:
#do something else
解决方法
您可以使用cx_freeze从py文件创建可执行文件。
https://cx-freeze.readthedocs.io/en/latest/overview.html