Skip to content
Advertisement

Make executable from code specified in a script

Is it possible to create an executable from a specified amount of code in a script?

For example:

#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

Advertisement

Answer

You can use cx_freeze to create an executable from your py file.
https://cx-freeze.readthedocs.io/en/latest/overview.html

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement