knox revised this gist . Go to revision
1 file changed, 6 insertions
E2B-5.py(file created)
@@ -0,0 +1,6 @@ | |||
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 |
Newer
Older