Changed make_resource_list as George suggested.

git-svn-id: https://callirhoe.googlecode.com/svn/branches/phantome@182 81c8bb96-aa45-f2e2-0eef-c4fa4a15c6df
This commit is contained in:
ph4ntome@gmail.com 2014-10-31 17:01:56 +00:00
parent eac11c2455
commit b0deb9523f

View File

@ -1,15 +1,13 @@
#!/usr/bin/env python2
import glob
lang = glob.glob('lang/*.py')
style = glob.glob('style/*.py')
layouts = glob.glob('layouts/*.py')
geom = glob.glob('geom/*.py')
res = dict()
for x in ['lang', 'style', 'layouts', 'geom']:
res[x] = glob.glob('%s/*.py' % x)
out = open('resources.py', 'w')
out.write('resource_list = { ')
out.write('"lang" : ' + str(lang) + ', ')
out.write('"style" : ' + str(style)+ ', ')
out.write('"layouts" : ' + str(layouts) + ', ')
out.write('"geom" :' + str(geom) + ' }')
out.close()
for x in res.keys():
out.write('resources_list["%s"] = %s\n' % (x, str(res[x])))
out.close()