coderplex-org/openrank-backend

Python program which take Languge,codefile,testcases as input and returns whether the code passes or not

Closed this issue · 4 comments

Python program which take Languge,codefile,testcases as input and returns whether the code passes or not

from click._compat import raw_input
import py_compile

fname = raw_input('Please enter filename...')
if (fname.__contains__(".py")):
    try:
        py_compile.compile(fname)
    except Exception as e:
        print(str(e))
else:
    fileObject = open(fname, 'r')
    print(fileObject.read())

Is anyone working on this?

N/A for now.