view python/apps/build.py @ 84:5205ebcfe6df prototype2

Removed print
author windel
date Sun, 18 Nov 2012 13:39:04 +0100
parents 654c5ac4f2c5
children
line wrap: on
line source

import sys, os, argparse
sys.path.insert(0, os.path.join('..','libs'))

# Compiler imports:
from compiler import Compiler
from project import Project

if __name__ == '__main__':
   parser = argparse.ArgumentParser(description='Build tool to build projects')
   parser.add_argument('project', type=str, help='the project to be build')
   args = parser.parse_args()

   try:
      project = Project(args.project)
   except IOError:
      print('Failed to load {0}'.format(args.project))
      sys.exit(3)
   pc = Compiler()
   pc.compileProject(project)