Checking errors programatically.
how to syntax error check my python code programatically? like I tried compile_command() and, InteractiveInterpreter.runcode(), InteractiveInterpreter.runsource() I like the first approach tho, because I guess I can just send the errors to the other file by calling a function from that file. And the second one I'm feeling like it might not work for me. Cuz, the code object doesn't get created if I get Syntax Error or OverflowError, And it results in None, So no accessing the errors from there. Also, There is no errors key/variable in the code object to begin with, which will give me errors. Altho there might be some inner class or method which might help me with this. I'm basically building a programaticall error check but I wanna get all the errors in the file I'm error checking at one.