[Spambayes] OptionsClass.update_file doesn't create a new file

Brad Clements bkc at murkworks.com
Sun Jul 27 18:32:38 EDT 2003


On both Python 2.2.3 and 2.3b2, it seems that this method doesn't write missing values 
to the designated file on Windows 2000.

All I get is an empty file with length of 0.

from spambayes.Options import options

options.update_file("i:/temp/mkwbayes.ini")

07/27/2003  05:26p                   0 mkwbayes.ini

Perhaps there's a problem in shutil.copyfileobj, or tempfile won't rewind on windows.. ?

I added print out.tell(),

        print "out file is ", out.tell()
        out.seek(0)

prints "out file is 0"



-- 
Brad Clements,                bkc at murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
http://www.wecanstopspam.org/                   AOL-IM: BKClements




More information about the Spambayes mailing list