i have a problem... i am new to python... and i have found a program that reads an sms directly from the phone's inbox... i am using nokia 6600... i just want to ask how will i be able to copy the sms file to a string? here is the code i saw in the net:

import appuifw,e32
import inbox
flag=0

def exit_key_handler():
app_lock.signal()

def read():
appuifw.app.title=u"Encoded Message"
box=inbox.Inbox()
id=box.sms_messages()
msg=box.content(id[0]) # <-- how will i be able to copy this sms file to a string

round.set(msg)

app_lock = e32.Ao_lock()
round = appuifw.Text()
decodedmsg=[]
appuifw.app.body = round

appuifw.app.menu = [(u"Read message", read)]

appuifw.app.title=u"Message Retriever"

appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()


* hope someone will help me with this...

Use code tag.

msg=box.content(id[0]) # <-- how will i be able to copy this sms file to a string 
print type(msg)  #Show what datatype msg is
print msg        #Try to print the message

Post the outcome of this

thank you very much

@snippsat

NameError: name 'msg' is not defined... dont get it.. msg mas defined already... hmmm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.