annotate master/bin/fixDates.py @ 39:bb09db2afe6b

try to fix a few more niggling bugs
author Henry S. Thompson <ht@markup.co.uk>
date Thu, 29 Nov 2018 15:14:46 +0000
parents ad6eff2bc6f9
children 3313edbab3b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
1 #!/usr/bin/env python3
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
2 import sys,re
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
3 from array import array
33
4c117ee8ed75 fixDates, _fixAndMerge, _doFetch
Henry S. Thompson <ht@markup.co.uk>
parents: 32
diff changeset
4 from time import strftime
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
5 ok=re.compile('(https?) ([^ ]*) ((?:19|20)..) ([0-9][0-9]*)$')
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
6 #parseable=re.compile('.*[-:/]\w+[-:/]|\w+\s\d{4}|\d{10}')
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
7 from dateparser import parse
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
8
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
9 n=0
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
10 bogons=0
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
11 HTTP=0
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
12 HTTPS=1
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
13 sn=['http','https']
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
14 http_ytab=list(201*[None]) # 1900--2100
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
15 https_ytab=list(201*[None])
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
16 tab=[http_ytab,https_ytab]
34
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
17 nd=[0,0] # no date
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
18 ed=[0,0] # date < 1900
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
19 ld=[0,0] # date > 2100
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
20 mn=[None,'Jan','Feb','Mar','Apr','May','Jun',
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
21 'Jul','Aug','Sep','Oct','Nov','Dec']
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
22 months=dict(zip(mn[1:],range(1,13)))
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
23 for l in sys.stdin:
33
4c117ee8ed75 fixDates, _fixAndMerge, _doFetch
Henry S. Thompson <ht@markup.co.uk>
parents: 32
diff changeset
24 if l[0]=='#':
34
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
25 print('#1 %s'%strftime('%Y-%m-%d %H:%M:%S'),file=sys.stderr)
33
4c117ee8ed75 fixDates, _fixAndMerge, _doFetch
Henry S. Thompson <ht@markup.co.uk>
parents: 32
diff changeset
26 continue
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
27 n+=1
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
28 ff=ok.match(l)
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
29 if ff is not None:
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
30 #print(l,end='')
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
31 scheme=HTTP if ff.group(1)=='http' else HTTPS
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
32 count=None
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
33 try:
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
34 # More alphas then numerics...
39
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
35 count=int(ff.group(4))
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
36 try:
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
37 month=months[ff.group(2)]
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
38 except KeyError:
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
39 month=int(ff.group(2))
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
40 year=int(ff.group(3))
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
41 except:
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
42 # Unusual month or year field
27
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
43 try:
39
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
44 # day 1 is because w/o it the default is today's is used, which may
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
45 # fail if it's e.g. 31 March today and the string is "April 2017"
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
46 d=parse("1 %s %s"%(ff.group(2),ff.group(3)))#,languages=['en'])
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
47 if d is None or count is None:
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
48 print(5,ff.group(1),ff.group(2),ff.group(3),ff.group(4),
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
49 file=sys.stderr)
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
50 bogons+=1
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
51 continue
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
52 elif d.year<1900 or d.year>2100:
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
53 # Shouldn't happen
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
54 print(7,ff.group(1),ff.group(2),ff.group(3),ff.group(4),
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
55 file=sys.stderr)
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
56 bogons+=1
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
57 continue
27
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
58 else:
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
59 month=d.month
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
60 year=d.year
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
61 except Exception as e:
39
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
62 print(6,ff.group(1),e,l,file=sys.stderr)
27
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
63 bogons+=1
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
64 continue
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
65 else:
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
66 cols=l.split()
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
67 scheme=cols[0]
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
68 if scheme[-1]==':':
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
69 scheme=scheme[0:-1]
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
70 if scheme not in ('http','https'):
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
71 # The last 3 lines are needed because we get both http: with nothing else, when there was no last-mod
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
72 # header, or http by itself, when the last-mod consisted entirely of TZ info, which then gets deleted
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
73 print(1,scheme,l,file=sys.stderr)
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
74 bogons+=1
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
75 continue
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
76 scheme=HTTP if scheme=='http' else HTTPS
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
77 try:
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
78 cols=cols[1:]
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
79 count=int(cols.pop())
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
80 except:
39
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
81 print(2,sn[scheme],count,l,file=sys.stderr)
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
82 bogons+=1
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
83 continue
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
84 if cols==[]:
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
85 nd[scheme]+=count
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
86 continue
24
b4e3beb2227e improved error handling,
Henry S. Thompson <ht@markup.co.uk>
parents: 20
diff changeset
87 else:
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
88 l=' '.join(cols)
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
89 try:
34
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
90 d=parse(l)#,languages=['en']))
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
91 if d is None:
39
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
92 print(3,sn[scheme],l,count,file=sys.stderr)
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
93 bogons+=1
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
94 continue
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
95 elif d.year<1900 or d.year>2100:
34
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
96 # Jan 0001 does show up, so log these as early / late
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
97 (ed if d.year<1900 else ld)[scheme]+=count
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
98 continue
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
99 else:
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
100 year=d.year
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
101 month=d.month
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
102 except Exception as e:
39
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
103 print(4,sn[scheme],e,l,count,file=sys.stderr)
31
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
104 bogons+=1
580cc12c9712 partway to rework after failure of mergedWhich.x64700
Henry S. Thompson <ht@markup.co.uk>
parents: 27
diff changeset
105 continue
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
106 # log it
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
107 yy=tab[scheme]
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
108 y=year-1900
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
109 if yy[y] is None:
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
110 yy[y]=mm=array('L',13*[0])
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
111 else:
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
112 mm=yy[y]
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
113 mm[month]+=count
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
114 if n==0:
27
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
115 # ssh screwed up
dd19cf97b6dd attempt to fix robustness pblms
Henry S. Thompson <ht@markup.co.uk>
parents: 24
diff changeset
116 exit(1)
34
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
117 print('#2 %s'%strftime('%Y-%m-%d %H:%M:%S'),file=sys.stderr)
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
118 for s in (HTTP,HTTPS):
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
119 if nd[s]!=0:
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
120 print(sn[s],0,0,nd[s],sep='\t')
34
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
121 if ed[s]!=0:
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
122 print(sn[s],0,1,ed[s],sep='\t')
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
123 if ld[s]!=0:
ad6eff2bc6f9 fixes to logging and efficiency, see also notes.txt wrt patches to dateparser
Henry S. Thompson <ht@markup.co.uk>
parents: 33
diff changeset
124 print(sn[s],0,2,ld[s],sep='\t')
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
125 yy=tab[s]
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
126 for y in range(201):
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
127 mm=yy[y]
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
128 if mm is not None:
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
129 for m in range(1,13):
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
130 if mm[m]!=0:
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
131 print(sn[s],mn[m],y+1900,mm[m],sep='\t')
39
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
132 print('#3 %s %s %s'%(strftime('%Y-%m-%d %H:%M:%S'),
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
133 n,bogons),
bb09db2afe6b try to fix a few more niggling bugs
Henry S. Thompson <ht@markup.co.uk>
parents: 34
diff changeset
134 file=sys.stderr)
32
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
135
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
136
9342f6269edf rewritten to be faster, maybe, and avoid earlier bug
Henry S. Thompson <ht@markup.co.uk>
parents: 31
diff changeset
137