rogerxavier commited on
Commit
c3dbb64
1 Parent(s): 2c03cb6

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +1 -0
api.py CHANGED
@@ -59,6 +59,7 @@ async def delete_files(directory: str):
59
  def file_executer(file_name:str)->"执行返回":
60
  try:
61
  result = subprocess.check_output(["python", f"{file_name}.py"]).decode("utf-8")
 
62
  return PlainTextResponse(result)
63
  except subprocess.CalledProcessError as e:
64
  return PlainTextResponse(f"Error executing {file_name}.py: {e}")
 
59
  def file_executer(file_name:str)->"执行返回":
60
  try:
61
  result = subprocess.check_output(["python", f"{file_name}.py"]).decode("utf-8")
62
+ print("执行完成py任务:",file_name)
63
  return PlainTextResponse(result)
64
  except subprocess.CalledProcessError as e:
65
  return PlainTextResponse(f"Error executing {file_name}.py: {e}")