Discussion:
[Bitpim-devel] Running on python 2.2
Peter Pletcher
2004-06-28 19:30:27 UTC
Permalink
First of all, thanks to y'all for writing this tool!

Here are a couple patches I needed to get bitpim
running.

My python 2.2 does not have 'enumerate' for sequences.
Here is a patch to get around that:

diff -u -r1.39 importexport.py
--- importexport.py 22 Jun 2004 02:04:10 -0000
1.39
+++ importexport.py 28 Jun 2004 19:17:45 -0000
@@ -977,8 +977,11 @@
newdata=[]
for row in data:
line=[]
- for i,k in enumerate(keys):
+ # for i,k in enumerate(keys)
+ i = 0
+ for k in keys:
line.append(row.get(k, defaults[i]))
+ i += 1
newdata.append(line)

# return our hard work

I don't have an 'addressbook.db' file locally. The
'brute force' (return first folder) code needs this:

diff -u -r1.3 evolution.py
--- native/evolution/evolution.py 21 Jun 2004
04:37:59 -0000 1.3
+++ native/evolution/evolution.py 28 Jun 2004
19:17:46 -0000
@@ -196,7 +196,7 @@
if "address book" in f['type']:
return f["folderid"]
# brute force
- return getfolders[0]['folderid']
+ return getfolders()[0]['folderid']

Pawing around in the DB file seems iffy to me, so I'm
working on querying the evolution EBook interface
instead. More soon.
Roger Binns
2004-06-29 00:31:44 UTC
Permalink
Post by Peter Pletcher
My python 2.2 does not have 'enumerate' for sequences.
We use Python 2.3 for the binary distributions of
BitPim. Unless someone can convince me otherwise,
I intend to place the same requirements for working
from source as a developer.

I did post a few weeks ago about how to get
Python 2.3 plus all the other stuff working
for RedHat 9.
Post by Peter Pletcher
I don't have an 'addressbook.db' file locally. The
Thanks, I have applied it.
Post by Peter Pletcher
Pawing around in the DB file seems iffy to me, so I'm
working on querying the evolution EBook interface
instead. More soon.
I completely agree about the iffyness of reading the DB
files directly. I couldn't find any other method of
doing it.

With Outlook, it even provides the gui code for selecting
a folder. I had to write all that myself for Evolution.

I presume there is some way of getting information out
of kaddressbook, but I am not writing any more import
code myself (others are always free to submit it
of course).

Roger
Roger Binns
2004-06-29 17:23:29 UTC
Permalink
[For some reason it looks like this didn't make it to the list
so it is a resend]
Post by Peter Pletcher
My python 2.2 does not have 'enumerate' for sequences.
We use Python 2.3 for the binary distributions of
BitPim. Unless someone can convince me otherwise,
I intend to place the same requirements for working
from source as a developer.

I did post a few weeks ago about how to get
Python 2.3 plus all the other stuff working
for RedHat 9.
Post by Peter Pletcher
I don't have an 'addressbook.db' file locally. The
Thanks, I have applied it.
Post by Peter Pletcher
Pawing around in the DB file seems iffy to me, so I'm
working on querying the evolution EBook interface
instead. More soon.
I completely agree about the iffyness of reading the DB
files directly. I couldn't find any other method of
doing it.

With Outlook, it even provides the gui code for selecting
a folder. I had to write all that myself for Evolution.

I presume there is some way of getting information out
of kaddressbook, but I am not writing any more import
code myself (others are always free to submit it
of course).

Roger

Loading...