Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mlejva authored Oct 16, 2024
1 parent 9981f98 commit bb28eb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ JavaScript / TypeScript
import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create()
await sbx.runCode()('x = 1')
await sbx.runCode('x = 1')

const execution = await sbx.runCode()('x+=1; x')
const execution = await sbx.runCode('x+=1; x')
console.log(execution.text) // outputs 2
```

Expand All @@ -62,8 +62,8 @@ Python
from e2b_code_interpreter import Sandbox

with Sandbox() as sandbox:
sandbox.run_code()("x = 1")
execution = sandbox.run_code()("x+=1; x")
sandbox.run_code("x = 1")
execution = sandbox.run_code("x+=1; x")
print(execution.text) # outputs 2
```

Expand Down

0 comments on commit bb28eb5

Please sign in to comment.