You Are Here:

Community: Developer Discussion Boards

#1 Old Thumbs up [announce] envy module for 3rd : prevent red key from aborting Python ! - 2007-11-15, 19:18

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Hello everybody ,

Here's the new module for 3rd as I have promised you
This module allows you to prevent red key from aborting Python shell or Python app in 3rd edition !
More than that it prevent Python to be closed in low memory condition.

@nslp : no need to recompile pyS60 source code with your patch !

code example :

Code:
import envy

print envy.version
print envy.is_app_system() # not yet !
try:
  envy.set_app_system(1) # try to set system your application
                         # (standalone) or python shell if you run it from there !
except: 
  print 'exception !'
  
print envy.is_app_system() # it should work !
print "now it's impossible to abort Python by pressing red key !"
print 'try it to abort python with red key :D'
I have tryed to make has_cap function for testing if a python shell is unsigned or selfsign at the execution but it doesn't work it report false result
I have let in this release you could test it and send me feedback
Just run test_envy2.py ...

links :
envy 3rd 1.0.0 selfsigned
envy 3rd 1.0.0 unsigned


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#2 Old Re: [announce] envy module for 3rd : prevent red key from aborting Python ! - 2007-11-16, 07:06

Join Date: Jan 2007
Posts: 80
federico2929
Offline
Regular Contributor
Great!! No more embarrassing presentations were I close my program by mistake

Thanks
Reply With Quote

#3 Old Re: [announce] envy module for 3rd : prevent red key from aborting Python ! - 2007-12-12, 07:04

Join Date: Jan 2007
Posts: 80
federico2929
Offline
Regular Contributor
Hi,

I finally tried using the envy module, and it does set the app
to system, at least according to envy.is_app_system() which returns
a 1, but I am still able to exit using the mighty red key.



I am running the my script through "Python Run" from the python application, does it only work in standalone apps?

I am running the latest firmware and python on a Nokia N95

Thanks,
Reply With Quote

#4 Old Re: [announce] envy module for 3rd : prevent red key from aborting Python ! - 2007-12-12, 09:31

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by federico2929 View Post
Hi,

I finally tried using the envy module, and it does set the app
to system, at least according to envy.is_app_system() which returns
a 1, but I am still able to exit using the mighty red key.



I am running the my script through "Python Run" from the python application, does it only work in standalone apps?

I am running the latest firmware and python on a Nokia N95

Thanks,
Hello federico


It should work with standalone app and also in Python shell(it's also a standalone app )
It doesn't prevent to disable red key but prevent to exit app. When you press red key app go to background.
1) Is your Python shell unsigned (13 caps) ?
2) Is envy.version (1,0,2) ?

Next version(soon !) will allow you to hide app from task manager

BR
Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#5 Old Re: [announce] envy module for 3rd : prevent red key from aborting Python ! - 2008-04-14, 04:23

Join Date: Feb 2008
Posts: 63
blackpaw
Offline
Regular Contributor
Brilliant, thanks Cyke - I just posted a question about how to prevent the red key closing my app.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable the red key for closing Python? carknue Python 3 2007-11-15 22:18
[announce] clipboard module in pure python code cyke64 Python 3 2007-10-05 14:45
phone app & long press red key morost General Symbian C++ 2 2007-09-21 08:51
[announce] Call status and key press module agrauballe Python 21 2007-09-19 02:45
Carbide.j 1.5 and Netbeans 5.5 beta 2 ovjo12 Mobile Java Tools & SDKs 5 2007-06-11 06:43

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia