J
Joe Richett
Hi all,
I have a python program and I have some "user defined" command stored in
a separate text file. Is there a builtin command with which I can load
the "user defined"-file and execute every command line by line, e.g.
#
# MAIN PROGRAM
#
def a(i):
print "here we are #", i
if __name__ == "__main__":
for i in range(10):
a(i)
<execute everything from FILE.PY>
------------------------------------------------------
#
# USER DEFINED FILE
#
print "here we are in the user defined file"
I have a python program and I have some "user defined" command stored in
a separate text file. Is there a builtin command with which I can load
the "user defined"-file and execute every command line by line, e.g.
#
# MAIN PROGRAM
#
def a(i):
print "here we are #", i
if __name__ == "__main__":
for i in range(10):
a(i)
<execute everything from FILE.PY>
------------------------------------------------------
#
# USER DEFINED FILE
#
print "here we are in the user defined file"