You Are Here:

Community: Developer Discussion Boards

#1 Old sgmllib? - 2008-02-07, 11:39

Join Date: Feb 2008
Posts: 12
IreStep
Offline
Registered User
Hi all,

Im looking for some help..

i have a script, i will admit its not mine!!, however i would like to use it for a test application on my phone while i learn python.

i want to save the hyperlinks from a given URL into a file.
When i run this file in my PyDev IDE the URLS show and everything works fine but when i try the code out on my phone (Nokia E65) i get errors!!

The error is saying that ive an "import error" no module named sgmllib!! Are there some libraries that are missing on the mobile platform??

Thanks For All Your Help Guys
Reply With Quote

#2 Old Re: sgmllib? - 2008-02-07, 14:29

Join Date: Mar 2003
Posts: 125
Location: UK
aya42
Offline
Regular Contributor
Quote:
Originally Posted by IreStep View Post
The error is saying that ive an "import error" no module named sgmllib!! Are there some libraries that are missing on the mobile platform??
To keep it relatively small, the PyS60 distro contains only a small subset of the standard Python modules. Some of the missing modules should work if you copy them from the Python 2.2.2 distro.
Reply With Quote

#3 Old Re: sgmllib? - 2008-02-07, 16:10

Join Date: Feb 2008
Posts: 12
IreStep
Offline
Registered User
Hi ,

Thank you for fast response.
Where would you place the sgmllib file so that i make it appear in the emulator im using.

Thanks again
Reply With Quote

#4 Old Re: sgmllib? - 2008-02-07, 20:39

Join Date: Nov 2007
Posts: 26
neil1811
Offline
Registered User
Quote:
Originally Posted by IreStep View Post
Hi ,

Thank you for fast response.
Where would you place the sgmllib file so that i make it appear in the emulator im using.

Thanks again
i actually had the same issue last week when iwas adding libs to my emulator! wherever you have the emulator installed just put it in the folder "resource" you should see all the pther libs pys60 has in there too.. hope that helps!
Reply With Quote

#5 Old Smile Re: sgmllib? - 2008-02-07, 23:35

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
Quote:
Originally Posted by neil1811 View Post
i actually had the same issue last week when iwas adding libs to my emulator! wherever you have the emulator installed just put it in the folder "resource" you should see all the pther libs pys60 has in there too.. hope that helps!
Another choice is dynamically modify Python import path.

PYTHONPATH enviroment variables tells where to look .py files. It maps to sys.path in Python execution context.

Example:

Code:
import sys
sys.path.append("E://magic_folder_on_my_memory_card")

import sgmllib
Then just use PCSuite to copy smgllib.py to this folder on your memory card. You can get it from Python 2.2.2 Windows distribution.

Note that this technique does not work on native extensions (.pyd files).


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
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

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 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ