DZone 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

Snippets has posted 5883 posts at DZone. View Full User Profile

Switch Application To Foreground In Pys60

  • submit to reddit
        Taken from the 'appswitch' module <a href=>here</a>
import appswitch
print appswitch.switch_to_fg(u"Menu")
Updated (19 Oct 05)
Now it can
- listing running applications
- switching them to foreground/background
- closing/killing apps
# listing
apps = appswitch.application_list(True) # true = include all
                                       # false = no hidden apps 
print apps

# to background and closing
print appswitch.switch_to_bg(u"TODO")
print appswitch.end_app(u"TODO")


Snippets Manager replied on Mon, 2007/08/06 - 12:01pm

This might be a newbie question, I'm trying to get this working on Windows, and I keep getting a Cos "no module named appsswitch " I try dropping the package into my base_py folder, as well as sites-lib, I don't however have the e32 module is not a required dependency? Or is that just for using this on a Nokia\New-Line thanks