Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mwlib/scanfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'mwlib/scanfile.py')
-rwxr-xr-xmwlib/scanfile.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/mwlib/scanfile.py b/mwlib/scanfile.py
new file mode 100755
index 0000000..96519d2
--- /dev/null
+++ b/mwlib/scanfile.py
@@ -0,0 +1,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)