-
Notifications
You must be signed in to change notification settings - Fork 15
How to use this library in your projects
headwinds edited this page Oct 27, 2014
·
3 revisions
From PyPi (mostly stable)
pip install spawningtool
From GitHub (less stable)
pip install -e git+git://github.com/StoicLoofah/spawningtool.git#egg=spawningtool
To execute it directly from the command line
python -m spawningtool PATH/TO/REPLAY
To execute it from within python
import spawningtool.parser
spawningtool.parser.parse_replay('PATH/TO/REPLAY')
To execute it as a module from within your python project:
- Copy the second spawningtool folder ( the one that contains the main.py file) into your project.
- You could then use spawningtool to help you build a replay model
import spawningtool
from spawningtool.parser import GameTimeline
class SpawningReplayModel():
def loadRequestedReplay(self, filePath):
result_replay = spawningtool.parser.parse_replay(filePath)
return result_replay