I have an error in my file like error : compiler need source file as argument, how to solve this problem?
@astongoldsmith23964 жыл бұрын
Jackson i download whole content from github and open my PyScripter in potable python on windows then try to run file teenytiny.py from folder part3 then i receive error message about sys.argv is not 2 ..why is that ? i mean all files are there lex.py parse.py emit.py are in same folder ? .................................................................................................. def main(): print("Teeny Tiny Compiler") if len(sys.argv) != 2: sys.exit("Error: Compiler needs source file as argument.") with open(sys.argv[1], 'r') as inputFile: input = inputFile.read()
@jacksonk4 жыл бұрын
You need to pass a source file you want to compile
@astongoldsmith23964 жыл бұрын
That is great man,,is there a way that this small compiler work on Windows too? Also do you can show simple mandelbrot dractal with 3 while loop?
@jacksonk4 жыл бұрын
Since the compiler is written in Python and compiles to C, it can run anywhere Python and C run, which includes Windows :)