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
