<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: inbox code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 01:44:01 GMT</pubDate>
    <description>DZone Snippets: inbox code</description>
    <item>
      <title>PyS60 - listSMS to File.txt</title>
      <link>http://snippets.dzone.com/posts/show/3042</link>
      <description>// Salva la lista degli SMS in un file&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;from time import ctime&lt;br /&gt;&lt;br /&gt;import codecs&lt;br /&gt;import inbox&lt;br /&gt;&lt;br /&gt;box = inbox.Inbox()&lt;br /&gt;msg = box.sms_messages()&lt;br /&gt;&lt;br /&gt;f = codecs.open('E:/Others/listSMS.txt', 'w', 'utf8') # Apre il file in codifica UTF8&lt;br /&gt;for i in msg:&lt;br /&gt;	f.write(box.address(i))&lt;br /&gt;	f.write('\n')&lt;br /&gt;	f.write(ctime(box.time(i))) # Converte i secondi in una stringa rappresentante il tempo&lt;br /&gt;	f.write('\n')&lt;br /&gt;	f.write(box.content(i))&lt;br /&gt;	f.write('\n')&lt;br /&gt;f.close()&lt;br /&gt;&lt;br /&gt;print 'Fine'&lt;br /&gt;&lt;br /&gt;f = codecs.open('E:/Others/listSMS.txt', 'r', 'utf8')&lt;br /&gt;print f.read()&lt;br /&gt;f.close()&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 27 Nov 2006 00:52:47 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3042</guid>
      <author>whitetiger ()</author>
    </item>
    <item>
      <title>Read SMS with inbox module</title>
      <link>http://snippets.dzone.com/posts/show/1331</link>
      <description>The new pys60 (1.3.1) provide 'inbox' module to read SMS.&lt;br /&gt;It can also notify you when a new message arrives.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&gt;&gt;&gt; import inbox&lt;br /&gt;&gt;&gt;&gt; i = inbox.Inbox()&lt;br /&gt;&gt;&gt;&gt; m = i.sms_messages()  # all message ID's&lt;br /&gt;&gt;&gt;&gt; i.content(m[0])     # first message&lt;br /&gt;u&#8217;foobar&#8217;&lt;br /&gt;&gt;&gt;&gt; i.time(m[0])&lt;br /&gt;1130267365.03125&lt;br /&gt;&gt;&gt;&gt; i.address(m[0])     # Only name is given :(&lt;br /&gt;u&#8217;John Doe&#8217;&lt;br /&gt;&gt;&gt;&gt; i.delete(m[0])&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I wish the i.address gave more detail information.&lt;br /&gt;Currently, if you need the number, you need to search&lt;br /&gt;the &lt;a href=http://bigbold.com/snippets/posts/show/379&gt;contact database&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;See an example of notification callback in the documentation.</description>
      <pubDate>Wed, 01 Feb 2006 08:41:46 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1331</guid>
      <author>korakot (Korakot Chaovavanich)</author>
    </item>
  </channel>
</rss>
