I've got a couple of scripts (named one.py and two.py) circularly calling each other using execfile. The one.py (which is the one to start) has some code (initialize) that I would like to execute only once.
I would like to continue using execfile if possible
How could I achieve this ?
#one.py
def initialize():
# initializing
initialize()
# do the main work
execfile('two.py')
----------------------------
#two.py
# do some work
execfile('one.py')