Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Korakot Chaovavanich http://korakot.stumbleupon.com

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

Open another app as content handler

Current python for series 60 (version 1) doesn't support graphics drawing on screen. But it still allows you to open an image file or other content file using external content handler. Here is the short and shorter versions to demonstrate.

   1  
   2  # this version wait for external app to exit, then it continue.
   3  import e32
   4  lock = e32.Ao_lock()
   5  handler = appuifw.Content_handler(lock.signal)
   6  hander.open(filename)  # eg. an image file
   7  lock.wait()	# wait for lock.signal to unlock
   8  
   9  # this is a short, one-line version which doesn't wait
  10  appuifw.Content_handler().open(filename)

Open another application in python series 60

   1  
   2  >>> import e32
   3  >>> e32.start_exe('z:\\system\\programs\\apprun.exe', 'z:\\system\\apps\\camcorder\\camcorder.app')


Another method would be opening a file in its 'Content_handler'.
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS