Discussion:
[BitPim-devel] DSV replacement with csv
Mike Rovner
2005-05-21 19:40:06 UTC
Permalink
Hi,

I just submitted patch 1206234 for DSV replacement with csv.
It works for me with Samsung SCH670. I was not able to test with other
models. I'd happily fix the issues with this patch.

It's my first post here, so let me introduce myself.
My name is Mike Rovner and I'm developing with Python for around 6 years. My
favorite areas are Python and Python/C(++) integration.
I do it at work for money and at home for fun.

Regards,
Mike
Roger Binns
2005-05-22 19:59:35 UTC
Permalink
Post by Mike Rovner
I just submitted patch 1206234 for DSV replacement with csv.
It works for me with Samsung SCH670. I was not able to test with other
models. I'd happily fix the issues with this patch.
How do you handle unicode? (The csv module barfs, I think DSV gets it
right by accident not design).

The DSV module has two very nice features. One is that it guesses the
delimiter (and even gets it right sometimes :-) and the other is that
it guesses if the first row is a header row (and gets that right sometimes
as well :-)
Post by Mike Rovner
My name is Mike Rovner and I'm developing with Python for around 6 years. My
favorite areas are Python and Python/C(++) integration.
BitPim currently has almost every possible Python/C integration method
in use! There is Swig for the usb stuff, half Swig/half C++ for Windows
Address Book (currently unused) and full custom code for APSW and string
matching.

I presume you saw the todo list - http://bitpim.org/todo.html

There are several other items not on there as well such as tighter integration
on Linux and Mac. Are you interested in algorithms, user interface, OS
plumbing?

Roger
Roger Binns
2005-05-22 20:11:59 UTC
Permalink
Post by Mike Rovner
I just submitted patch 1206234 for DSV replacement with csv.
It works for me with Samsung SCH670. I was not able to test with other
models. I'd happily fix the issues with this patch.
Please can you redo the patch, but without all the gratuitous
changes? It looks like some of the source lines in BitPim
has extra trailing spaces and your patch removes them as
well.

If you can write a short script to find and remove those spaces
then we can do that as a seperate step before your actual
changes.

Also are you only fixing the use of DSV for the AT based protocol
or for the import of CSV data as well?

Roger
Mike Rovner
2005-05-22 21:38:34 UTC
Permalink
Please can you redo the patch, but without all the gratuitous changes?
OK
It looks like some of the source lines in BitPim
has extra trailing spaces and your patch removes them as
well.
That was "courtesy" of my editor.
Also are you only fixing the use of DSV for the AT based protocol
or for the import of CSV data as well?
I tried to replace all occurencies of DSV, however only tested for data
transfer from phone to bp.

Mike
Roger Binns
2005-05-23 01:26:30 UTC
Permalink
BTW please also don't put "if 0" for code blocks or comment
them out in patches. They should just be outright removed
if not used. We can always get them back from CVS.
Post by Mike Rovner
Post by Roger Binns
It looks like some of the source lines in BitPim
has extra trailing spaces and your patch removes them as
well.
That was "courtesy" of my editor.
I do think they should be removed, but it is best done with a script
rather than mixed in with another patch. BTW what do you use for
your editor?
Post by Mike Rovner
I tried to replace all occurencies of DSV, however only tested for data
transfer from phone to bp.
Make a directory named tests then cd into the experiments directory.
Run gentestdata.py ..\tests

That will generate a phonebook.csv in the tests directory (along with
a lot of other stuff). Then use BitPim to csv import the file. The file
will be quite large and have many fields so you will get an idea of any
peformance bottlenecks (it should be way faster than DSV).

Roger
Mike Rovner
2005-05-25 07:47:58 UTC
Permalink
Please can you redo the patch, but without all the gratuitous changes?
Patch updated.

Sorry I did have much time these days.
I'll come back on other things a bit later.

Mike
Roger Binns
2005-05-28 04:25:22 UTC
Permalink
Post by Mike Rovner
Please can you redo the patch, but without all the gratuitous changes?
Patch updated.
Both patches in the tracker contain gratuitous whitespace fixups. Please
post a patch without that.

Roger
Mike Rovner
2005-05-28 07:01:31 UTC
Permalink
Post by Roger Binns
Post by Mike Rovner
Please can you redo the patch, but without all the gratuitous changes?
Patch updated.
Both patches in the tracker contain gratuitous whitespace fixups. Please
post a patch without that.
Will do. I thought I fixed that. Argh.
Sorry for disturbance,
Mike

Loading...