Skip to content

Instantly share code, notes, and snippets.

@leozc
Created May 3, 2020 12:19
Show Gist options
  • Save leozc/72397f06fca47d2aace79f4dbfc86679 to your computer and use it in GitHub Desktop.
Save leozc/72397f06fca47d2aace79f4dbfc86679 to your computer and use it in GitHub Desktop.
repl implementation for python in Bazel
https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt#L350
add
```
import code
code.interact()
```
@leozc
Copy link
Author

leozc commented May 3, 2020

Or if need ipython support

import IPython
IPython.embed()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment