Exemplo n.º 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())
Exemplo n.º 2
0
def interpreter_runner(code, ostream):
    interpret_code(code, output_stream=ostream)
Exemplo n.º 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())

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