summaryrefslogtreecommitdiff
path: root/components/rtgui/utils/perfect_hash/example-PyModule/test.py
diff options
context:
space:
mode:
authoraozima <[email protected]>2013-02-22 13:54:15 +0800
committeraozima <[email protected]>2013-02-22 13:54:15 +0800
commit8a8f904e1b6239b895fe97a63eaad62cdef67f61 (patch)
tree893d8026dedf827fbb060da91dff504b7cb6d300 /components/rtgui/utils/perfect_hash/example-PyModule/test.py
parent8421ecfa277eeb813e7c217955328c6329208f38 (diff)
parent4e7247e072e9b298a8811e5db9041558fb5e7c68 (diff)
Merge branch 'master' into aozima
Conflicts: bsp/stm32f107/project.uvproj
Diffstat (limited to 'components/rtgui/utils/perfect_hash/example-PyModule/test.py')
-rw-r--r--components/rtgui/utils/perfect_hash/example-PyModule/test.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/components/rtgui/utils/perfect_hash/example-PyModule/test.py b/components/rtgui/utils/perfect_hash/example-PyModule/test.py
deleted file mode 100644
index 02c06b6926..0000000000
--- a/components/rtgui/utils/perfect_hash/example-PyModule/test.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-import sys
-from timeit import Timer
-from stations import locator
-
-call = sys.argv[1]
-print repr(call)
-D = {}
-
-for line in file('stations.dat'):
- c, l = [x.strip() for x in line.split(',')]
- D[c] = l
-
-def test1(c):
- return D[c]
-
-print repr(test1(call))
-t = Timer("test1(%r)" % call, "from __main__ import test1")
-print t.timeit()
-
-# -----
-
-def test2(c):
- return locator(c)
-
-print repr(test2(call))
-t = Timer("test2(%r)" % call, "from __main__ import test2")
-print t.timeit()