[spambayes-dev] Re: unicode error in sb_dbexpimp.py

Skip Montanaro skip at pobox.com
Tue Mar 9 20:23:08 EST 2004


    Tony> How 2.3-specific is csv.py?

Not terribly, I don't think, though I've never tried building it under 2.2.
(Are you thinking we could deliver it with Spambayes for people running 2.2?

    Tony> Could there be a compatCsv.py file added, like compatSets?

Probably wouldn't be too hard to generate the subset we need.

    Tony> Alternatively, what about using tab as a field separator?  It
    Tony> seems unlikely that there'll ever be a token that contains a tab,
    Tony> so it wouldn't have to worry about that.

Like it or not, while the probability of a collision is substantially
reduced, I don't think you can ignore it.

    Tony> Speaking of patches to sb_dbexpimp.py, I'd like to have it use the
    Tony> database in the configuration (if it exists) by default, since the
    Tony> other scripts (like spamcounts.py) do, and I end up typing
    Tony> "c:\documents and settings\tameyer.massey\application
    Tony> data\spambayes\default_bayes_database.db" all the time, which is
    Tony> quite a mouthful.  Of course, the script takes more than one
    Tony> database name, which is a problem.  Any ideas for a way to do this
    Tony> nicely?  Or am I just too lazy?

The only problem is that sb_dbexpimp.py works a little differently than most
apps.  I suppose if you omitted the -d and -p flags it could default to use
the database in the configuration though.  Assuming a full round-trip you'd
still have to use -d or -p for either the import or export.

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?

Skip



More information about the spambayes-dev mailing list