Features:
- Attempts to strip common leading whitespace (see nteract/hydrogen#862)
- Variable explorer (see nteract/hydrogen#64)
Compatibility:
- Hydrogen version 2.3.0 or later
- Variable explorer has only been tested to work with Python 3.5 or later. Pull requests to add Python 2 support are welcome.
Lets you select and run code blocks that are indented (e.g. inside a function). No configuration needed.
Example:
def foo():
x = 1
print('x is', x)
# Select the above two lines and run them with Hydrogen!
Does not work if the first line ends in :
and you have a comment after, i.e.
if True: # having a comment here breaks things
print("This doesn't work!")
It also can have unexpected results if you select some code that is malformed to begin with, e.g.
x = 1
print("x is", x) # This works even though it shouldn't
(Pull requests are welcome to fix the first issue; the second probably can't be fixed without changing the Hydrogen package)
Activate using the "Hydrogen Python: Toggle Variable Explorer" command.
This feature is currently in proof-of-concept status. Please file an issue about any functionality you want to have in the variable exploror!