Closed an-OK-squirrel closed 8 years ago
I made this stack file in /usr/bin:
stack
/usr/bin
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os path = "/Users/towerofnix/Documents/stack-lang-liam/stack" # PUT YOUR PATH HERE <----------------------------------------------------------- import sys sys.path.insert(0, path) import interpeter if len(sys.argv) != 2: sys.exit(0) filename = sys.argv[1] filename = os.path.abspath(filename) try: with open(filename) as f: prog = f.read() print('***STARTING PROGRAM***') try: interpeter.interpet(prog, filename) except SystemExit: pass print('***ENDING PROGRAM***') except IOError as err: print('The file %s does not exist!' % err.filename)
Ah, thanks.
No prob.
I made this
stack
file in/usr/bin
: