Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,6 +34,15 @@ def run_code_with_inputs(code: str, inputs: str) -> str:
|
|
| 34 |
|
| 35 |
processes.append(subprocess.run(
|
| 36 |
["fpc", file_path.removesuffix('.pseudo')+'.pas'],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
input=input_data,
|
| 38 |
text=True,
|
| 39 |
capture_output=True,
|
|
|
|
| 34 |
|
| 35 |
processes.append(subprocess.run(
|
| 36 |
["fpc", file_path.removesuffix('.pseudo')+'.pas'],
|
| 37 |
+
text=True,
|
| 38 |
+
capture_output=True,
|
| 39 |
+
timeout=10
|
| 40 |
+
))
|
| 41 |
+
outputs.append(processes[-1].stdout)
|
| 42 |
+
errors.append(processes[-1].stderr)
|
| 43 |
+
|
| 44 |
+
processes.append(subprocess.run(
|
| 45 |
+
[file_path.removesuffix('.pseudo')],
|
| 46 |
input=input_data,
|
| 47 |
text=True,
|
| 48 |
capture_output=True,
|