You Are Here:

Community: Developer Discussion Boards

#1 Old Question How to disable the red key for closing Python? - 2007-11-14, 20:39

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
It is very bad, that python closes completly as soon as you hit the red key. How could we prevent this?
Reply With Quote

#2 Old Re: How to disable the red key for closing Python? - 2007-11-14, 20:55

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
This behavior is normal in 3rd phones
You can't prevent it in PyS60 !
But ... if you apply THIS PATCH to PyS60 source code and recompile it you have the wished behaviour



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

#3 Old Re: How to disable the red key for closing Python? - 2007-11-15, 16:07

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

There's a new solution : use envy module (created by me and release today

Code:
import envy

print envy.version
print envy.is_app_system()
try:
  envy.set_app_system(1)
except: 
  print 'exception !'
  
print envy.is_app_system()
print 'now python can't be terminated by red key !'
So now no need to recompile PyS60 !

I hope that this new module could help you

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/
Last edited by cyke64 : 2007-11-15 at 19:20. Reason: add envy module link
Reply With Quote

#4 Old Thumbs up Re: How to disable the red key for closing Python? - 2007-11-15, 22:18

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
Many thanks cyke64! It works on E90 and N95. I already implemented into pynetmony. I had to use the unsigned version.
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 change the functionality of red key on emulator RaveendraB Symbian User Interface 4 2007-10-09 11:22
phone app & long press red key morost General Symbian C++ 2 2007-09-21 08:51
red key behaviour davidmaxwaterman General Symbian C++ 12 2007-06-14 08:37
Red Key FatalError Mobile Java General 4 2006-09-08 19:41
problem of pressing red key on Series 40 yaby Mobile Java General 0 2005-09-13 05:24

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