Skip to content

Commit 185061f

Browse files
committed
Fixes up many errors and cleans up the setup.py and README.txtfiles for launch to pypi
1 parent a0b3e12 commit 185061f

File tree

7 files changed

+156
-135
lines changed

7 files changed

+156
-135
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*~
22
*.pyc
33
dist
4+
build
45
sc2reader.egg-info

README.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ Example Usage
2929
Player 3 - HaRib0 (Protoss)
3030
Player 4 - neosmatrix (Zerg)
3131

32+
The same results can be found using the sc2printer utility script which simply
33+
wraps up the above code as a (simple) demonstration of the libraries utility::
34+
35+
$ sc2printer game1.sc2replay game2.sc2replay
36+
3237
See the sc2replay `wiki`_ for additional usage details.
3338

3439
Current Status

sc2reader/objects.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,15 @@ def __str__(self):
9595

9696

9797
class Event(object):
98-
def __init__(self,elapsedTime,eventType,eventCode,globalFlag,playerId,
99-
location=None,bytes=""):
100-
98+
def __init__(self,elapsedTime,eventType,eventCode,globalFlag,playerId,
99+
location=None,bytes=""):
101100
self.time,seconds = (elapsedTime,elapsedTime/16)
102101
self.timestr = "%s:%s" % (seconds/60,str(seconds%60).rjust(2,"0"))
103102
self.type = eventType
104103
self.code = eventCode
105104
self.local = (globalFlag == 0x0)
106105
self.player = playerId
107-
self.location = location
106+
self.location = location
108107
self.bytes = bytes
109108

110109
def __call__(self,elapsedTime,eventType,globalFlag,playerId,eventCode,bytes):
@@ -119,9 +118,6 @@ def __call__(self,elapsedTime,eventType,globalFlag,playerId,eventCode,bytes):
119118
return self
120119

121120

122-
123-
124-
125121
class Message(object):
126122

127123
def __init__(self,time,player,flags,bytes):
@@ -169,4 +165,3 @@ def __str__(self):
169165

170166
def __repr__(self):
171167
return str(self)
172-

0 commit comments

Comments
 (0)