hello ,
I don't understand what you want to do
So if you want put few lines in default.py file you can do like this
Code:
#
# default.py
#
import sys
import os
import appuifw
#=
#= Force importing from the local directory first.
#=
localpath = str(os.path.split(appuifw.app.full_name())[0])
sys.path = [localpath] + sys.path
import appname
try:
application = appname.Myapp()
application.run()
except:
appuifw.note(unicode(sys.exc_info()))
Code:
#
# appname.py
#
import appuifw
import os
import sys
import e32
class Myapp:
def __init__(self):
self.script_lock = e32.Ao_lock()
#
# init codde ...
#
self.script_lock.wait()
def run(self):
#
# your codde
#
self.script_lock.wait()
if __name__ == '__main__':
#
# if you launch script from Python shell
#
application = Myapp()
application.run()
#
# appname.py in the same folder
#
I hope this can help you