RE: [Python-Dev] Re: [Csv] csv module TODO list
Raymond Would the csv module be a good place to add a DBF reader and Raymond writer? Not really. Raymond I've posted a draft on ASPN. It interoperates well with the Raymond rest of the CSV module because it also accepts/returns a list Raymond of fieldnames and a sequence of records. Raymond http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 Just clean it up (do the doco thing) and check it in as dbf.py with reader and writer functions. I see your modus operandi at work: code something in Python then switch to C when nobody's looking. ;-) Skip ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Re: [Csv] csv module TODO list
Would the csv module be a good place to add a DBF reader and writer? I would have thought it would make sense as it's own module (in the same way that we have separate modules that present a common interface for the different databases), or am I missing something? I'd certainly like to see a DBF parser in python - reading and writing odd file formats is bread-and-butter for us contractors... 8-) -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Re: [Csv] csv module TODO list
* is CSV going to be maintained outside the python tree? If not, remove the 2.2 compatibility macros for: PyDoc_STR, PyDoc_STRVAR, PyMODINIT_FUNC, etc. Andrew Does anyone thing we should continue to maintain this 2.2 Andrew compatibility? With the release of 2.4, 2.2 has officially dropped off the radar screen, right (zero probability of a 2.2.n+1 release, though the probability was vanishingly small before). I'd say toss it. Do just that in a single checkin so someone who's interested can do a simple cvs diff to yield an initial patch file for external maintenance of that feature. * inline the following functions since they are used only in one place get_string, set_string, get_nullchar_as_None, set_nullchar_as_None, join_reset (maybe) Andrew It was done that way as I felt we would be adding more getters Andrew and setters to the dialect object in future. The only new dialect attribute I envision is an encoding attribute. * is it necessary to have Dialect_methods, can you use 0 for tp_methods? Andrew I was assuming I would need to add methods at some point (in Andrew fact, I did have methods, but removed them). Dialect objects are really just data containers, right? I don't see that they would need any methods. * remove commented out code (PyMem_DEL) on line 261 Have you used valgrind on the test to find memory overwrites/leaks? Andrew No, valgrind wasn't used. I have it here at work. I'll try to find a few minutes to run the csv tests under valgrind's control. Skip ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Re: [Csv] csv module TODO list
Andrew There's a bunch of jobs we (CSV module maintainers) have been Andrew putting off - attached is a list (in no particular order): ... In addition, it occurred to me this evening that there's functionality in the csv module I don't think anybody uses. For example, you can register CSV dialects by name, then pass in the string name instead of the dialect class. I'd be in favor of scrapping list_dialects, register_dialect and unregister_dialect altogether. While they are probably trivial little functions I don't think they add much if anything to the implementation and just complicate the _csv extension module slightly. I'm also not aware that anyone really uses the Sniffer class, though it does provide some useful functionality should you need to analyze random CSV files. Skip ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com