summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaheshgudi2016-06-02 16:30:44 +0530
committeradityacp2016-07-27 22:52:23 +0530
commite46bd90fb2907a7a43786bee95985072e256cd56 (patch)
treef1d39a8e364cb1201566ecac71cd42e8df67be98
parentcf52baf30e5902c2f3c79cfbd8df88789ccd09ce (diff)
downloadonline_test-e46bd90fb2907a7a43786bee95985072e256cd56.tar.gz
online_test-e46bd90fb2907a7a43786bee95985072e256cd56.tar.bz2
online_test-e46bd90fb2907a7a43786bee95985072e256cd56.zip
removed literal_eval from python_stdio_evaluator
-rw-r--r--yaksh/python_stdio_evaluator.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/yaksh/python_stdio_evaluator.py b/yaksh/python_stdio_evaluator.py
index 5db80f5..003337d 100644
--- a/yaksh/python_stdio_evaluator.py
+++ b/yaksh/python_stdio_evaluator.py
@@ -29,12 +29,7 @@ class PythonStdioEvaluator(CodeEvaluator):
submitted = compile(user_answer, '<string>', mode='exec')
if expected_input:
input_buffer = StringIO()
- try:
- literal_input = literal_eval(expected_input.split("\n"))
- except ValueError:
- literal_input = expected_input.split("\n")
- for inputs in literal_input:
- input_buffer.write(str(inputs)+'\n')
+ input_buffer.write(expected_input)
input_buffer.seek(0)
sys.stdin = input_buffer