Specifications

57
# known issues: the stats about the processed messages and some screen output
# while running are wrong (but the data files generated are ok).
# Also, when user aborts a file write error, the line is still counted as added
# Cause is known and harmless, will be fixed in 1.60 final.
#
# Updated list of format ID numbers (range of format specifications) in use:
# 1 (5-9), 2 (10-14), 3 (15-19), 4 (20-24)
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from __future__ import with_statement
try:
import sys
if sys.hexversion >= 0x030000F0:
print ("ERROR: Python 3000 is not supported. Use Python 2.5.4 instead!\n")
sys.exit()
if sys.hexversion < 0x020502F0:
print "WARNING: untested on earlier versions than Python ver. 2.5.2\n"
if sys.hexversion > 0x020504F0:
print "WARNING: untested on later versions than Python ver. 2.5.4\n"
import os
import string
import time
import glob
import hashlib
import cPickle
import calendar
import signal
from bintx import *
try:
import win32api
from win32com.client import Dispatch, pywintypes
except ImportError:
print 'Error - PyWin32 is not installed.'
sys.exit()
except ImportError:
print 'ERROR: needed modules from the standard library are not available. Reinstall
Python\n'
sys.exit()
signal.signal(signal.SIGBREAK, signal.default_int_handler)#to trap ctrl-break
localtestmode = False#True
FilterMalformed = True
HashFunc = hashlib.sha1#before 1.60 hashlib.sha512() was used but this was much
overkill: even with 128 bits