python - Initialize only once -


i've got couple of scripts (named one.py , two.py) circularly calling each other using execfile. one.py (which 1 start) has code (initialize) execute once.

i continue using execfile if possible

how achieve ?

#one.py def initialize():              # initializing  initialize()  # main work  execfile('two.py')  ----------------------------  #two.py  # work  execfile('one.py') 

why not create third file zero.py starts initializing , executes one.py executes loop.

 #zero.py  def initialize(): # initializing  initialize()  execfile('one.py') 

on note there should better ways run code loop of execfile.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -