#!/usr/bin/env python2 import glob 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 = {}\n') for x in res.keys(): out.write('resource_list["%s"] = %s\n' % (x, str(res[x]))) out.close()