E2B-5.py
· 181 B · Python
Sin formato
from e2b_code_interpreter import Sandbox
with Sandbox() as sandbox:
sandbox.run_code("x = 1")
execution = sandbox.run_code("x+=1; x")
print(execution.text) # outputs 2
1 | from e2b_code_interpreter import Sandbox |
2 | |
3 | with Sandbox() as sandbox: |
4 | sandbox.run_code("x = 1") |
5 | execution = sandbox.run_code("x+=1; x") |
6 | print(execution.text) # outputs 2 |