×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    10

    how to display incoming call list for a date

    import appuifw,logs


    d=appuifw.query(u"type a date:","date")
    m=logs.calls(mode='in')[0]
    if m["date"]==d:
    print m["number"]

    This code is showing error for "date".what's d solution?plz reply soon.

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

    Re: how to display incoming call list for a date

    The first thing you have to do is tell us what error you're getting. The second thing you have to do is read the PyS60 Library Reference, the section about the logs module, to see for yourself how things are done.

    Try this code:
    Code:
    import appuifw, logs, time
    
    
    d=appuifw.query(u"type a date:","date")
    m=logs.calls(mode='in')[0]
    if time.localtime(m["time"])[0:3]==time.localtime(d)[0:3]:
       print m["number"]
    m["time"] and d are Unix timestamps. time.localtime() generates a tuple from them. We then compare the first 3 elements of the two tuples (year, month and day) and if they match, show the number.

Similar Threads

  1. Display a text file
    By pierre_remi in forum Symbian
    Replies: 3
    Last Post: 2008-11-10, 09:29
  2. How to suppress incoming call dialog?
    By zdenko in forum Symbian
    Replies: 12
    Last Post: 2008-06-25, 13:56
  3. Replies: 0
    Last Post: 2007-12-31, 11:26
  4. Replies: 2
    Last Post: 2007-08-07, 12:23
  5. Series 40 Sound and Incoming Call Confliction
    By jl1337 in forum General Development Questions
    Replies: 0
    Last Post: 2005-11-08, 09:26

Posting Permissions

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