I think the key is in the OP's second post:
Quote:
|
when Python first loads up and I imported the script.
|
In BoaConstructor, this fails:
UnboundLocalError: local variable 'twentysevenLines' referenced before assignment
modules = {}
def main ():
print "First Line."
twentysevenLines()
print "Second Line."
def newLine():
print
def threeLines():
newLine()
newLine()
newLine()
def nineLines():
threeLines()
threeLines()
threeLines()
def twentysevenLines():
nineLines()
nineLines()
nineLines()
if __name__ == '__main__':
main() but this works:
from precmod import *
modules ={'precmod': [0, '', 'precmod.py']}
def main ():
print "First Line."
twentysevenLines()
print "Second Line."
if __name__ == '__main__':
main() precmod.py
def newLine():
print
def threeLines():
newLine()
newLine()
newLine()
def nineLines():
threeLines()
threeLines()
threeLines()
def twentysevenLines():
nineLines()
nineLines()
nineLines()