Categories: Python | S60 | Code Examples | How To
This page was last modified 20:26, 26 April 2008.
How to use the envy module
From Forum Nokia Wiki
This article is about How to use the Python extension "Envy" by Cyke64
The envy module is for 3rd Edition devices only.
Envy is mainly used to prevent closing/exiting/aborting the python/application on pressing the red/disconnect key. Also a useful feature is that it prevents Python to be closed in low memory condition too.
Below is the code for the same.
#importing the module envy import envy #Print version of envy print envy.version print envy.is_app_system() try: envy.set_app_system(1) # trying to set system your application # (standalone) or python shell if you run it from there ! except: print 'exception !' #exception encountered print envy.is_app_system() #After this code it the pythonshell would not exit #on pressing the red/disconnect key
Download links :
An Added update to the envy module has a additional feature.
Using it one could check if the python scriptshell is unsigned with dev cert (13) or selfsigned (5 caps) or amazing with any capabilities,
Below is the code for using this added feature.
from envy import * # testing selfsigned print has_capabilities(SELFSIGNED) # return 1 if True / 0 if false print has_capabilities('selfsigned') print has_capabilities('ALL-ReadDeviceData-WriteDeviceData-TrustedUI-ProtServ-SwEvent-Location-SurroundingsDD-PowerMgmt-NetworkControl-CommDD-MultimediaDD-DiskAdmin-DRM-TCB-AllFiles') print has_capabilities((ECapabilityReadUserData,ECapabilityWriteUserData,ECapabilityUserEnvironment,ECapabilityNetworkServices,ECapabilityLocalServices)) print has_capabilities('ReadUserData+WriteUserData+UserEnvironment+NetworkServices+LocalServices') # testing unsigned print has_capabilities('unsigned') # testing your against any capabilities set print has_capabilities('ALL-TCB-AllFiles') # Display capacity in Python Script shell or your standalone application if running #from this location ! print app_capabilities()
Download Links :
Another added update to the envy extension has made possible remove Python Script shell icon or your standalone application icon from task list. Thus the application runs in the background an thus becomes invisible!
Below is the code for making the application/Pythonshell invisible.
importing the module envy import envy #Print version of envy print envy.version print envy.is_app_hidden() try: envy.set_app_hidden(1) # try to hide your application from tasklist # (standalone) or python shell if you run it from there ! except: print 'exception !' print envy.is_app_hidden() #Now pythonshell would have disappeared from the Taskbar/Tasklist.
Download links :
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| question about Nokia 3510i MIDP SDK | JasonRight | Mobile Java Tools & SDKs | 4 | 2006-03-05 07:28 |
| memory of 7650 | Check | Symbian Tools & SDKs | 1 | 1970-01-01 02:00 |
| Need for hashlib module to use SHA256 encryption | lfd | Python | 0 | 2006-09-11 13:47 |
| How to switch ON/OFF Bluetooth? | carknue | Python | 3 | 2007-11-27 20:11 |
| Importing new modules in pys60? | Faultsprofit | Python | 1 | 2007-04-12 13:47 |
