Esempio n. 1
0
def main(argv):
    if len(argv) == 2:
        load_file(argv[1], nucleus.load())

        return 0
    elif len(argv) == 1:
        try:
            repl(nucleus.load())
        except SystemExit:
            print "\nSee ya!"

        return 0
    else:
        print "Usage: %s foo.pmc" % argv[0]
        return 1
Esempio n. 2
0
def _load(args, env):
    assert isinstance(args, VPair), "not enough arguments"

    val = args.car
    assert isinstance(val, VString), "must be a string"

    return load_file(val.value, env)
Esempio n. 3
0
def load_kernel(which, env):
    return load_file("kernel/%s" % which, env)