#!/usr/bin/env python """ pluvo - Pluvo Interpreter Author: Sean B. Palmer, inamidst.com Example: $ pluvo hello.pvo Hello world! """ import sys import cStringIO as StringIO import pluvo def main(): arg = sys.argv[1] if arg in ('-v', '--version'): import os.path fn = os.path.join(os.path.dirname(pluvo.__file__), 'library/version') f = open(fn) version = f.read() version = version.rstrip('\r\n') f.close() print version sys.exit() f = open(arg) program = pluvo.compiler.compile(f) f.close() i = pluvo.interpreter.Interpreter(program) i.run() if __name__ == '__main__': main()