Jppy: 0.0.33 is ready

Nicholas Piper nick-jppy at nickpiper.co.uk
Tue Oct 24 14:38:58 BST 2006


Norbert,

On Tue, 24 Oct 2006, Norbert Preining wrote:

> On Die, 24 Okt 2006, Nicholas Piper wrote:
> > nicholas at piamox7:~$ python
> > >>> import jppy
> > >>> len(jppy.memo32List().records())

> [~] python
> Python 2.4.4 (#2, Oct 20 2006, 00:23:25) 
> [GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import jppy
> >>> len(jppy.memo32List().records())
> 23
> >>> 

> So not many. And the length is not exorbitant of the files.

Hmm.. Is your memo32 db private? Could you send it me? Please also try
removing it or using a blank Memo32DB. You can get a blank one from
http://cvs.zanu.org.uk/svn/jppy/trunk/home/.jpilot/Memo32DB.pdb
. Don't forget to clear out your pc3 too.

> In fact the execution of the above was VERY fast! Is there a way to
> read the stuff in from python cmdline? I am a python idiot ;-)

Sure, the main advantage of this library is the Python API :-) I use
it to programatically process my data.

Try:

import jppy
for r in jppy.addressBook().records(search="piper"):
  print r['firstname'], r['lastname']

(obviously with a name that you'll match :-) )

print r.keys() will then show you what fields are available. You can
make vcard files like this:

open('/tmp/card.vcf','w').write(r.vcard())

 Nick


-- 
Nick Piper, Developer, LogicaCMG           http://www.nickpiper.co.uk/
GPG Encrypted mail welcome!                             1024D/3ED8B27F
Choose life. Be Vegan :-) Please reduce needless cruelty + suffering !




More information about the Jppy mailing list