[spambayes-dev] Re: unicode error in sb_dbexpimp.py
Tony Meyer
tameyer at ihug.co.nz
Tue Mar 9 19:41:03 EST 2004
> Shortly thereafter I realized why those calls are there. The
> code is using a ` as its field separator. The quote/unquote
> dance avoids problems with them.
>
> A better solution, IMO, would be to use the csv module. I
> have a patch ready to check in. Unfortunately that would
> restrict sb_dbexpimp.py to Python 2.3 or greater. Feedback?
How 2.3-specific is csv.py? Could there be a compatCsv.py file added, like
compatSets?
Alternatively, what about using tab as a field separator? It seems unlikely
that there'll ever be a token that contains a tab, so it wouldn't have to
worry about that.
Speaking of patches to sb_dbexpimp.py, I'd like to have it use the database
in the configuration (if it exists) by default, since the other scripts
(like spamcounts.py) do, and I end up typing "c:\documents and
settings\tameyer.massey\application
data\spambayes\default_bayes_database.db" all the time, which is quite a
mouthful. Of course, the script takes more than one database name, which is
a problem. Any ideas for a way to do this nicely? Or am I just too lazy?
=Tony Meyer
More information about the spambayes-dev
mailing list