Posting your script (simplified one is OK) probably helps other people understand where the problem is.
I guess that your code doesn't prevent a "main thread" from exiting using an e32.Ao_lock instance. As a result, it ends immediately after launching. Here is a simple HelloWorld script.
Perhaps, I'm making a wrong guess, but I hope you understand the concept of Ao_lock.
lock = e32.Ao_lock() # Create an e32.Ao_lock instance.
appuifw.app.title = u'HelloWorld'
appuifw.app.body = appuifw.Text(u'Hello World!')
appuifw.app.exit_key_handler = lock.signal # Signal lock when right softkey pressed.
lock.wait() # Wait until lock is signaled.