Track 1: purpose_agent/tools.py
Browse files- purpose_agent/tools.py +2 -1
purpose_agent/tools.py
CHANGED
|
@@ -19,6 +19,7 @@ import logging
|
|
| 19 |
import math
|
| 20 |
import os
|
| 21 |
import re
|
|
|
|
| 22 |
import time
|
| 23 |
import traceback
|
| 24 |
from abc import ABC, abstractmethod
|
|
@@ -334,7 +335,7 @@ class PythonExecTool(Tool):
|
|
| 334 |
f.write(code)
|
| 335 |
try:
|
| 336 |
result = subprocess.run(
|
| 337 |
-
[
|
| 338 |
capture_output=True, text=True,
|
| 339 |
timeout=self.timeout_seconds,
|
| 340 |
cwd=tmpdir,
|
|
|
|
| 19 |
import math
|
| 20 |
import os
|
| 21 |
import re
|
| 22 |
+
import sys
|
| 23 |
import time
|
| 24 |
import traceback
|
| 25 |
from abc import ABC, abstractmethod
|
|
|
|
| 335 |
f.write(code)
|
| 336 |
try:
|
| 337 |
result = subprocess.run(
|
| 338 |
+
[sys.executable, script],
|
| 339 |
capture_output=True, text=True,
|
| 340 |
timeout=self.timeout_seconds,
|
| 341 |
cwd=tmpdir,
|