File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 44
55import os ,sys
66sys .path .append (os .path .dirname (os .path .abspath (__file__ )))
7- from sc2reader import Replay
7+ import sc2reader
8+
9+ skipnames = ('empty' ,'footman' )
810
911def parse_replays ():
1012 # Run four times to dampen noise
@@ -14,12 +16,12 @@ def parse_replays():
1416 for root , sub_folders , files in os .walk (rootdir ):
1517 for file in files :
1618 basename , extension = os .path .splitext (file )
17- if (basename != "empty" and extension .lower () == ".sc2replay" ):
19+ if (basename not in skipnames and extension .lower () == ".sc2replay" ):
1820 file_list .append (os .path .join (root ,file ))
1921
2022 for file in file_list :
2123 print file
22- replay = Replay (file )
24+ replay = sc2reader . read (file )
2325
2426# Use the results of this function when comparing performance with other libraries.
2527def benchmark_with_timetime ():
@@ -34,5 +36,5 @@ def profile():
3436 stats .strip_dirs ().sort_stats ("time" ).print_stats (30 )
3537
3638
37- benchmark_with_timetime ()
38- # profile()
39+ # benchmark_with_timetime()
40+ profile ()
You can’t perform that action at this time.
0 commit comments