Python 使脚本中指定的代码可执行
是否可以从脚本中指定数量的代码创建可执行文件 例如:Python 使脚本中指定的代码可执行,python,python-3.x,executable,Python,Python 3.x,Executable,是否可以从脚本中指定数量的代码创建可执行文件 例如: #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 co
#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\u freeze从py文件创建可执行文件。