[spambayes-dev] modified version of sb_dbexpimp.py

Tony Meyer tameyer at ihug.co.nz
Tue Mar 16 17:55:05 EST 2004


[Skip]
> Since this is rather late in the game 1.0-wise I would
> like a little extra feedback before checking this stuff in.

I was too late trying it out for this, but it (cvs version) also works for
me.

One query (I've used the csv module quite a bit since I moved to 2.3, but
only reading, never writing, so haven't noticed this before):  I see that it
writes rows with '\r\n' termination, so in Excel I get blank lines between
every row (with a file as long as the spambayes database, this means I miss
a lot of data).

Should we provide an option to the dbexpimp script to change the line
terminator to '\n'?  (Simple enough to do, if I read the csv doc correctly).
Or maybe just have a "if sys.platform == "win32": lineterminator = '\n'"
kinda thing?

> Also, speak now or forever hold your peace if you think
> there's a reason to maintain backward compatibility with
> the old interchange format.  (My view is that it is just an
> interchange format and shouldn't be relied on for long-term storage.)

I agree.  +1 to dumping it (or rather, forcing people to use the 1.0a9
script).

[Skip again, from a message a little while back]
> It sounds like you use it a lot.  This is my first brush with it,
> and even there its use is embedded in a shell script so typing long
> filenames isn't a big deal.  What's your use case that you need
> it so frequently?

Thinking about it more, my usage pattern is/was both poorly thought out and
atypical, so my modification is a dumb idea.  I use it mostly when I could
use the (newer) spamcounts.py script instead, except that I've never got
around to figuring out how to use that script correctly (it never gives me
the right answers, but I'm sure it's operator error).  For example, I'll
want to see how often an experimental token gets used, or something like
that.  A lot of the time I could just use a shell script (even on Windows
<wink>) to get around the long pathname, anyway.  Forget I mentioned it ;)

=Tony Meyer




More information about the spambayes-dev mailing list