Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- prototypes = []
- for d, dirs, files in os.walk('prototypes'):
- for f in files:
- if f.endswith('lua'):
- path = os.path.join(d,f)
- prototypes.append(path)
- with open('prototype_collection.lua','w') as luafile:
- for prototype in prototypes:
- prototype = prototype.replace('.lua','').replace(os.sep,'.')
- # print prototype
- luafile.write('require("%s")\n'%prototype)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement