Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mwlib/scanfile.py
blob: 96519d279aec5fe7a8cfff9b4042709817e9c532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /usr/bin/env python

"""used for debugging/testing"""

import sys
import time
import mwscan

d=unicode(open(sys.argv[1]).read(), 'utf-8')

stime=time.time()
r=mwscan.scan(d)
needed = time.time()-stime
for x in r:
    print r.repr(x)

print needed, len(d), len(r)



# stime=time.time()
# r=mwscan.compat_scan(d)
# needed = time.time()-stime

# print "COMPAT:", needed, len(d), len(r)


# #mwscan.dump_tokens(d,r)
# #print needed, len(d), len(r)