×

Discussion Board

Results 1 to 5 of 5

Thread: sgmllib?

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    sgmllib?

    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

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    UK
    Posts
    125

    Re: sgmllib?

    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.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    12

    Re: sgmllib?

    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

  4. #4
    Registered User
    Join Date
    Nov 2007
    Posts
    26

    Re: sgmllib?

    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!

  5. #5
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Smile Re: sgmllib?

    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

    http://mfabrik.com
    http://blog.mfabrik.com

Posting Permissions

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