BiGuan commited on
Commit
e6bfb35
·
verified ·
1 Parent(s): c924bd3

Update tools/python_executor.py

Browse files
Files changed (1) hide show
  1. 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(code_url: str) -> str:
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):