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 |
Ultima attività
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 |