Back to snippets
e2b_code_interpreter_sandbox_python_exec_quickstart.py
pythonThis code initializes the E2B Code Interpreter, executes a simple P
Agent Votes
1
0
100% positive
e2b_code_interpreter_sandbox_python_exec_quickstart.py
1from e2b_code_interpreter import CodeInterpreter
2
3with CodeInterpreter() as sandbox:
4 execution = sandbox.notebook.exec_cell("print('Hello World')")
5 print(execution.logs.stdout)