You Are Here:

Community: Developer Discussion Boards

#1 Old importing modules (3rd Edition) - 2006-07-25, 14:43

Join Date: Jul 2006
Posts: 9
infomaniac
Offline
Registered User
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:
Quote:
* 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
Reply With Quote

#2 Old Re: importing modules (3rd Edition) - 2006-07-26, 04:58

Join Date: Feb 2005
Posts: 30
dnastase's Avatar
dnastase
Offline
Registered User
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
Reply With Quote

#3 Old Thumbs up Re: importing modules (3rd Edition) - 2006-07-26, 07:53

Join Date: Jul 2006
Posts: 9
infomaniac
Offline
Registered User
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
Reply With Quote

#4 Old Re: importing modules (3rd Edition) - 2006-08-08, 16:37

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
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
Reply With Quote

#5 Old Re: importing modules (3rd Edition) - 2006-08-08, 17:30

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
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,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

#6 Old Thumbs up Re: importing modules (3rd Edition) - 2006-08-08, 19:03

Join Date: Jul 2006
Posts: 9
infomaniac
Offline
Registered User
Great news! Thx!


"Computer Science is no more about computers than astronomy is about telescopes."
-- E. W. Dijkstra
Reply With Quote

#7 Old Re: importing modules (3rd Edition) - 2006-08-09, 09:46

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
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"...
Reply With Quote

#8 Old Re: importing modules (3rd Edition) - 2006-08-09, 10:18

Join Date: Jul 2006
Posts: 9
infomaniac
Offline
Registered User
Like with Duke Nukem ?


"Computer Science is no more about computers than astronomy is about telescopes."
-- E. W. Dijkstra
Reply With Quote

#9 Old Re: importing modules (3rd Edition) - 2007-09-14, 01:09

Join Date: Sep 2007
Posts: 3
Stansibran
Offline
Registered User
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!
Reply With Quote

#10 Old Re: importing modules (3rd Edition) - 2007-09-18, 16:22

Join Date: Sep 2007
Posts: 33
yanhua
Offline
Registered User
got it ! I'm also cofusing about installing new module.

Thanks a lot
Reply With Quote

#11 Old Re: importing modules (3rd Edition) - 2007-12-21, 19:45

Join Date: Oct 2007
Posts: 4
bsdwork
Offline
Registered User
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
Reply With Quote

#12 Old Re: importing modules (3rd Edition) - 2007-12-21, 23:00

Join Date: Feb 2007
Posts: 80
Location: Kyiv (Ukraine)
Send a message via MSN to Maxim6630
Maxim6630
Offline
Regular Contributor
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
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
Python for S60 3rd Edition jplauril Python 82 2008-06-04 05:47
S60 2nd OR 3rd edition for new software development patil_ruturaj Symbian Tools & SDKs 1 2006-06-30 10:30
S60 2nd OR 3rd edition for new software development patil_ruturaj Mobile Java Tools & SDKs 3 2006-06-30 09:57
Carbide C++ AppWizards for 3rd Edition ArneH Symbian Tools & SDKs 0 2006-05-20 22:22
TTime : TInt64& Int64() problem in S60 3rd edition iulian_moldovan Symbian Tools & SDKs 3 2006-01-24 14:07

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