File: lessonparser-test.py

package info (click to toggle)
solfege 2.0.4-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,200 kB
  • ctags: 1,844
  • sloc: python: 12,160; xml: 5,458; ansic: 1,486; makefile: 562; sh: 233
file content (36 lines) | stat: -rwxr-xr-x 702 bytes parent folder | download
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
30
31
32
33
34
35
36
#!/usr/bin/python2.2

import pygtk
pygtk.require("2.0")
import profile, os
import sys
if len(sys.argv) < 2:
    print "\nUsage: ./test/lessonparser-test.py lessonfile-to-test\n"
    sys.exit()

if os.path.isdir("soundcard"):
    sys.path.append(".")
else:
    sys.path.append("..")

import src.i18n
import src.lessonfile

def par():
	for n in range(100):
		src.lessonfile.DictationLessonfile(sys.argv[1])

import time
print "Startet tidtaking:"
t1 = time.clock()
par()
t2 = time.clock()
print t2-t1
#profile.run("par()", "profile.txt")

#import pstats
#p = pstats.Stats("profile.txt")
##p.strip_dirs().sort_stats('time').print_stats(30)
#p.strip_dirs().sort_stats('cumulative').print_stats(30)

#bas()