×

Discussion Board

Results 1 to 6 of 6

Thread: sorry to bother

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    34

    Unhappy sorry to bother

    I wrote a couple of utilities (for me and friends) some years ago, and now I moved from 6600 to 5800.
    So, I find myself to jump from 1.3.1 to 1.9.6; in the meantime, my Pc was changed, too, and I never installed SDK for Symbian until now.
    Few things to adjust, but I had a surprice. Contacs works fine, but (with console, too) this simple operation:

    import calendar
    db=calendar.open()

    give me the error:
    Attribute error: module object has no attribute 'open'

    The two lines (were working...) are exactly the same of the example was given by Nokia with Python 1.2.1 (if I remember exactly) and the last api refernce I found is for python 1.2...
    I'm sorry I missed some upgrade, but can give me a link to understand what changed?

    Thanks

    Pietro

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: sorry to bother

    Hi,

    You should consult the documentation for 1.9.6 which you can find by installing PythonForS60_1.9.6_Setup.exe or in PythonForS60_1.9.6.tar.gz. The documentation is now a collection of HTML documents. There you will find that:
    The calendar module of the previous PyS60 releases has been renamed as e32calendar.
    I tried
    Code:
    import e32calendar
    db = e32calendar.open()
    and it worked.

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    34

    Smile Re: sorry to bother

    Quote Originally Posted by bogdan.galiceanu View Post
    Hi,

    You should consult the documentation for 1.9.6 which you can find by installing PythonForS60_1.9.6_Setup.exe or in PythonForS60_1.9.6.tar.gz. The documentation is now a collection of HTML documents. There you will find that:


    I tried
    Code:
    import e32calendar
    db = e32calendar.open()
    and it worked.
    Thanks a lot, Bogdan.
    Actually I find html documents a good solution for on line help, but very awful for looking for something you don't know if exist and where.
    I imagine does not exit a pdf....

    Pietro

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: sorry to bother

    As far as I know there is no PDF for the new docs, sadly. But there are ways of searching in HTML docs too, like HTML Search and Replace.

  5. #5
    Registered User
    Join Date
    May 2005
    Posts
    34

    Question Re: sorry to bother

    Quote Originally Posted by bogdan.galiceanu View Post
    As far as I know there is no PDF for the new docs, sadly. But there are ways of searching in HTML docs too, like HTML Search and Replace.
    Thanks, I'll try, but the needs would be something that follow links (to avoid to know where physically are the files).

    I wonder why import does not give me an error. It means that exists a module with thi name, I'm curious to understand why to change name, and why leave a module with this name...

    pietro

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: sorry to bother

    Quote Originally Posted by pimol View Post
    I wonder why import does not give me an error. It means that exists a module with thi name, I'm curious to understand why to change name, and why leave a module with this name...
    Because calendar is also a module in standard Python, so they had to do this to avoid conflicts. From the documentation:
    The Python core of the current release is upgraded to Python 2.5.1 and hence few Pys60 extension module names clashes with those in Python core.
    For example, calendar and socket modules are present in both libraries.

Similar Threads

  1. How to identify Touch UI device?
    By JOM in forum Symbian
    Replies: 8
    Last Post: 2009-03-26, 11:20
  2. Replies: 1
    Last Post: 2006-09-24, 09:41
  3. 9290 Communicator With VoiceStream Network - Why Bother?
    By jfrosch in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2002-07-09, 14:40

Posting Permissions

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