First use correct indentation please ;-)
Then I think that main function is never called , use instead :
Code:
if __name__ == '__main__':
try:
app = Configure()
app.loop()
finally:
app.close(
Code:
import appuifw
import e32
# import messaging
e32.ao_yield()
class Configure:
def __init__(self):
self.user = u""
self.password = u""
self.lock = e32.Ao_lock()
self.old_title = appuifw.app.title
appuifw.app.title = u"Configure FIRMS"
self.exit_flag = None
appuifw.app.exit_key_handler = self.exit_key_handler
appuifw.app.body = get_form()
def get_form(self):
# Construct the form
result = [(u"User Name", text, self.user),(u"Password", text, self.password)]
return result
def exit_key_handler(self):
self.exit_flag = 1
self.lock.signal()
def loop(self):
try:
while not self.exit_flag:
self.lock.wait()
finally:
self.close()
def close(self):
appuifw.app.menu = []
appuifw.app.body = None
appuifw.app.exit_key_handler = None
appuifw.app.title = self.old_title
def abort(self):
# Exit-key handler.
self.exit_flag = True
self.lock.signal()
def refresh(self):
appuifw.app.body.set(self.user)
def main():
try:
app = Configure()
app.loop()
finally:
app.close()