[Spambayes-checkins] spambayes/Outlook2000/dialogs/resources
rc2py.py, 1.5, 1.6
Mark Hammond
mhammond at users.sourceforge.net
Tue Aug 26 04:57:46 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources
In directory sc8-pr-cvs1:/tmp/cvs-serv25926
Modified Files:
rc2py.py
Log Message:
Write the size and time of the .rc file, and don't bother deriving from
object.
Index: rc2py.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources/rc2py.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rc2py.py 20 Aug 2003 01:18:03 -0000 1.5
--- rc2py.py 26 Aug 2003 10:57:44 -0000 1.6
***************
*** 8,12 ****
with the same basic public interface as the rcparser module.
"""
! import sys, os
import rcparser
--- 8,12 ----
with the same basic public interface as the rcparser module.
"""
! import sys, os, stat
import rcparser
***************
*** 18,26 ****
outputFilename = "test.py"
rcp = rcparser.ParseDialogs(inputFilename)
out = open(outputFilename, "wt")
out.write("#%s\n" % outputFilename)
out.write("#This is a generated file. Please edit %s instead.\n" % inputFilename)
! out.write("class FakeParser(object):\n")
out.write("\tdialogs = "+repr(rcp.dialogs)+"\n")
out.write("\tids = "+repr(rcp.ids)+"\n")
--- 18,28 ----
outputFilename = "test.py"
rcp = rcparser.ParseDialogs(inputFilename)
+ in_stat = os.stat(inputFilename)
out = open(outputFilename, "wt")
out.write("#%s\n" % outputFilename)
out.write("#This is a generated file. Please edit %s instead.\n" % inputFilename)
! out.write("_rc_size_=%d\n_rc_mtime_=%d\n" % (in_stat[stat.ST_SIZE], in_stat[stat.ST_MTIME]))
! out.write("class FakeParser:\n")
out.write("\tdialogs = "+repr(rcp.dialogs)+"\n")
out.write("\tids = "+repr(rcp.ids)+"\n")
More information about the Spambayes-checkins
mailing list