示例#1
0
#!/usr/bin/env python
# The following import is for compatibility with both Python 2.6 and 3.x
from __future__ import print_function
import os, sys

sys.path.insert(0, '..')
from bob.interpreter import interpret_code

if __name__ == '__main__':
    if len(sys.argv) < 2:
        print("Expecting a scheme file to interpret")
    else:
        with open(sys.argv[1]) as f:
            interpret_code(f.read())
示例#2
0
def interpreter_runner(code, ostream):
    interpret_code(code, output_stream=ostream)
示例#3
0
#!/usr/bin/env python
# The following import is for compatibility with both Python 2.6 and 3.x
from __future__ import print_function
import os, sys

sys.path.insert(0, '..')
from bob.interpreter import interpret_code


if __name__ == '__main__':
    if len(sys.argv) < 2:
        print("Expecting a scheme file to interpret")
    else:
        with open(sys.argv[1]) as f:
            interpret_code(f.read())

示例#4
0
def interpreter_runner(code, ostream):
    interpret_code(code, output_stream=ostream)
示例#5
0
def interpret_file(filename=None):
    if not filename:
        filename = sys.argv[1]
    with open(filename) as f:
        interpret_code(f.read())
示例#6
0
def interpret_file(filename=None):
    if not filename:
        filename = sys.argv[1]
    with open(filename) as f:
        interpret_code(f.read())