×

Discussion Board

Results 1 to 12 of 12

Hybrid View

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    9

    importing modules (3rd Edition)

    Hello

    (Please excuse, if this is stupid. )

    Loading modules doesn't work on my E61. Like discribed in the readme file, I placed my pathinfo.py file in e:/python/lib/ and this also is in sys.path as it should be, but if I say import pathinfo I always get module not found.

    Code:
    >>> import pathinfo
    Traceback (most recent call last):
      File "<console>", line 1, in ?
    ImportError: No module named pathinfo
    Can anyone tell me what I'm doing wrong here??
    Thank you for all ideas!


    My stuff..
    Code:
    >>> sys.path
    ['c:\\private\\f0201515', 'c:\\resource', u'c:\\python\\lib', u'e:\\python\\lib']
    
    >>> os.listdir( 'e:/python/lib' )
    ['pathinfo.py']

    From the README file:
    * The script shell "Run script" function searches for Python scripts
    to run in the directories c:\python and e:\python. You can place
    any scripts you wish to run in one of these directories. The script
    shell will add the directories c:\python\lib and e:\python\lib into
    sys.path, if they exist. You can place any library modules you wish
    to use in one of these directories
    . To access these directories,
    you can use e.g. the Nokia PC Suite, a memory card reader or a file
    manager
    "Computer Science is no more about computers than astronomy is about telescopes."
    -- E. W. Dijkstra

  2. #2
    Registered User
    Join Date
    Feb 2005
    Posts
    30

    Re: importing modules (3rd Edition)

    I have never seen unicode strings in sys.path on my E70. Also my python only has the first two paths by default.

    Try to put normal strings in the sys.path and see if it works.

    Daniel

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    9

    Thumbs up Re: importing modules (3rd Edition)

    dnastase: Thank you, this seemed to work!!

    But the problem is, that I've not modified sys.path manually before and it seems that the Python environment gets this wrong!!

    Hopefully, this is corrected in the next version!
    "Computer Science is no more about computers than astronomy is about telescopes."
    -- E. W. Dijkstra

  4. #4
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: importing modules (3rd Edition)

    Yep, it's a bug. Python 2.2 apparently silently ignores Unicode entries in sys.path, while e.g. 2.4 handles them just fine.

    Fix was trivial and will be in 1.3.9.

    http://sourceforge.net/tracker/index...55&atid=790646

  5. #5
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: importing modules (3rd Edition)

    Quote Originally Posted by jplauril
    Yep, it's a bug. Python 2.2 apparently silently ignores Unicode entries in sys.path, while e.g. 2.4 handles them just fine.

    Fix was trivial and will be in 1.3.9.

    http://sourceforge.net/tracker/index...55&atid=790646
    1.3.9 py_60 ! When do you release it ? Very soon ?
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  6. #6
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: importing modules (3rd Edition)

    Quote Originally Posted by cyke64
    1.3.9 py_60 ! When do you release it ? Very soon ?
    Same schedule as always: "when it's done"...

  7. #7
    Registered User
    Join Date
    Jul 2006
    Posts
    9

    Thumbs up Re: importing modules (3rd Edition)

    Great news! Thx!
    "Computer Science is no more about computers than astronomy is about telescopes."
    -- E. W. Dijkstra

  8. #8
    Registered User
    Join Date
    Sep 2007
    Posts
    3

    Re: importing modules (3rd Edition)

    Quote Originally Posted by dnastase View Post
    I have never seen unicode strings in sys.path on my E70. Also my python only has the first two paths by default.

    Try to put normal strings in the sys.path and see if it works.

    Daniel
    Neither have I and since with my costa rica travel site I have seen a lot of the internet!
    All we want is love!

  9. #9
    Registered User
    Join Date
    Sep 2007
    Posts
    33

    Re: importing modules (3rd Edition)

    got it ! I'm also cofusing about installing new module.

    Thanks a lot

  10. #10
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: importing modules (3rd Edition)

    In rest.. how are you handling your E61? I was meaning to buy that phone .. but I need more opinions.. Also I see you are having software problems.. weird for Nokia.
    _____________________
    Costa Rica travel

  11. #11
    Registered User
    Join Date
    Feb 2007
    Location
    Kyiv (Ukraine)
    Posts
    83

    Re: importing modules (3rd Edition)

    import sys
    sys.path.append('c:\python\new_modules')
    sys.path.append('e:\other\python\new_modules')


    you can use any folder with your modules

Similar Threads

  1. Python for S60 3rd Edition
    By jplauril in forum Symbian
    Replies: 82
    Last Post: 2008-06-04, 04:47
  2. S60 2nd OR 3rd edition for new software development
    By patil_ruturaj in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-06-30, 09:30
  3. S60 2nd OR 3rd edition for new software development
    By patil_ruturaj in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2006-06-30, 08:57
  4. Carbide C++ AppWizards for 3rd Edition
    By ArneH in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2006-05-20, 21:22
  5. TTime : TInt64& Int64() problem in S60 3rd edition
    By iulian_moldovan in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2006-01-24, 13:07

Posting Permissions

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