Hi kashifrazzaqui and welcome to the Python Dibo,
It seems that the application faces some error and thus quits immediately.
To know what the error is you need to record it to a text file, and modify your code a bit.
Code:
def main():
try:
Your main code goes here.
except:
cla, exc, trbk = sys.exc_info()
excName = cla.__name__
try:
excArgs = exc.__dict__["args"]
except KeyError:
excArgs = "<no args>"
excTb = traceback.format_tb(trbk, 5)
errorString = repr(excName) + '-' + repr(excArgs) + '-' + repr(excTb) + '\n'
print errorString
appuifw.note(u'Application errors, see log file for more information', "error")
file = open(u'C:\\Log.txt','a')
file.write(errorString)
file.close()
raise
if __name__ == "__main__":
main()
Here when you check the Log (C:\\Log.txt) file after the application quits you will be able to find the error it face before quit.
Yes, a python application always needs python on the device to work, so you will have to use the ensymble to merge it with your application file.And because of this the files size will obiviously increase.
Hope that helps.
Best Regards
Croozeus