#! /usr/bin/env python
import sys, os, re
# From https://github.com/SirAnthony/slpp
import slpp
result = {}
for dirpath, dirnames, filenames in os.walk('.'):
for filename in filenames:
if 'scenario.lua' in filename:
with open (os.path.join(dirpath, filename), "r") as myfile:
filecontent = myfile.read()
data = slpp.slpp.decode('{' + filecontent + '}')
name = ''
try:
name = data['ScenarioInfo']['name']
result[name] = dirpath
except:
print('Error:' + dirpath)
for name in sorted(result.iterkeys()):
print(name + ' -> ' + result[name])
Statistics: Posted by Scrontch — 09 Sep 2013, 21:47
Statistics: Posted by Prince__ — 09 Sep 2013, 20:54
Statistics: Posted by Deep_ — 09 Sep 2013, 20:18
Statistics: Posted by Prince__ — 08 Sep 2013, 14:50
Statistics: Posted by Scrontch — 08 Sep 2013, 11:14