×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    53

    Is there anyway to unload an imported module?

    Hi,everyone.
    Is it possible to unload an imported module?

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,795

    Re: Is there anyway to unload an imported module?

    Quote Originally Posted by forumz View Post
    Hi,everyone.
    Is it possible to unload an imported module?
    Try this,

    Code:
    import modulename
    
    #do something here
    
    del modulename
    
    #the module is not accessible here
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    53

    Re: Is there anyway to unload an imported module?

    Quote Originally Posted by croozeus View Post
    Try this,

    Code:
    import modulename
    
    #do something here
    
    del modulename
    
    #the module is not accessible here
    Thank you. But it is not like unload the module.
    Here is my test:
    On N78 v30 rom after importing misty, using appuifw.app.set_exit()or sys.exit() will hang up the program. So I try to del misty before exit the program, but it hangs up again. So I think it is not really unload the module.

    There's another way to unlock / lock keypad except using misty??

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: Is there anyway to unload an imported module?

    thats the only way i know to remove the module from memory too. isit definitly those two lines that cause the program to hang? i assume you commented those two lines out and ran the code without it crashing?

    you can try pykeylock, but thats only available for pys60 1.4.5
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    53

    Re: Is there anyway to unload an imported module?

    Quote Originally Posted by the86hitman View Post
    thats the only way i know to remove the module from memory too. isit definitly those two lines that cause the program to hang? i assume you commented those two lines out and ran the code without it crashing?

    you can try pykeylock, but thats only available for pys60 1.4.5

    Thanks, I tested several times, misty cause the program to hang. Using pykeylock everything's ok now.

    By the way, where can I download your Project hStandby? I'm using E63 and python 1.45. Can I use it?
    Last edited by forumz; 2009-08-12 at 15:00.

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: Is there anyway to unload an imported module?

    Quote Originally Posted by forumz View Post
    Thanks, I tested several times, misty cause the program to hang. Using pykeylock everything's ok now.

    By the way, where can I download your Project hStandby? I'm using E63 and python 1.45. Can I use it?
    my project hStandby I've put on hold while I wait for last few extensions to be ported to 1.9.x .
    it is based on 1.4.5, and the last release (still very buggy) I made available at another forum - I shall PM you with the details incase i'm not allowed to post it here.
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

Similar Threads

  1. Buggy AMR Audio Recording. Please Help!!
    By jhamby in forum Symbian
    Replies: 8
    Last Post: 2009-07-07, 10:34
  2. Replies: 4
    Last Post: 2009-07-07, 10:07
  3. How to create a sis using ensymble and Python 1.9.4 ?
    By marcelobarrosalmeida in forum Symbian
    Replies: 10
    Last Post: 2009-05-27, 10:16
  4. Replies: 9
    Last Post: 2008-08-30, 07:05
  5. Carbide.j 1.5 and Netbeans 5.5 beta 2
    By ovjo12 in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-06-11, 05:43

Posting Permissions

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