Mercurial > mamba
view scripts/validate_level @ 338:2cadc8a427f0
a hackful GridContainer for the LevelMenu
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Fri, 16 Sep 2011 22:13:17 +0200 |
parents | 232c183346e9 |
children | 7586dbc4f865 |
line wrap: on
line source
#!/usr/bin/env python from mamba.level import Level, InvalidMapError import sys if __name__ == "__main__": if len(sys.argv) == 1: print 'Usage' print '%s <level name>' % sys.argv[0] sys.exit(1) level_name = ' '.join(sys.argv[1:]) try: level = Level(level_name) except InvalidMapError, error: print 'Map validation failed' print 'Exception: %s' % error sys.exit(1) except IOError, error: print "Unable to load some resources for the level" print "Exception: %s" % error sys.exit(1) print 'Level OK'