Spaces:
Sleeping
Sleeping
Update tools/python_executor.py
Browse files- tools/python_executor.py +3 -4
tools/python_executor.py
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
|
|
| 1 |
import sys
|
| 2 |
import io
|
| 3 |
import contextlib
|
| 4 |
-
import requests
|
| 5 |
|
| 6 |
-
def python_executor(
|
| 7 |
try:
|
| 8 |
-
|
| 9 |
-
r = requests.get(code_url, timeout=10)
|
| 10 |
code = r.text
|
| 11 |
f = io.StringIO()
|
| 12 |
with contextlib.redirect_stdout(f):
|
|
|
|
| 1 |
+
import requests
|
| 2 |
import sys
|
| 3 |
import io
|
| 4 |
import contextlib
|
|
|
|
| 5 |
|
| 6 |
+
def python_executor(file_url: str) -> str:
|
| 7 |
try:
|
| 8 |
+
r = requests.get(file_url, timeout=10)
|
|
|
|
| 9 |
code = r.text
|
| 10 |
f = io.StringIO()
|
| 11 |
with contextlib.redirect_stdout(f):
|