Add support for MATLAB-like cells#127
Open
wmvanvliet wants to merge 2 commits intoivanov:masterfrom
wmvanvliet:cell
Open
Add support for MATLAB-like cells#127wmvanvliet wants to merge 2 commits intoivanov:masterfrom wmvanvliet:cell
wmvanvliet wants to merge 2 commits intoivanov:masterfrom
wmvanvliet:cell
Conversation
When working on a longish script, its common to have chunks that need to
be executed frequently. For example, a computation you are working on that
spans multiple lines, or a plot that you are trying to get just right.
When using an IPython notebook, you would put these chunks in cells.
MATLAB has a similar idea, where %% markers deliminate cells, which can
be executed with a single key press.
With this PR, you can define cells like this:
print('Performing computation')
a = 1 + 2
b = a ** a
## Begin new cell
print('Result of computation:')
print(b)
Now you can execute the two cells independently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When working on a longish script, its common to have chunks that need to
be executed frequently. For example, a computation you are working on that
spans multiple lines, or a plot that you are trying to get just right.
When using an IPython notebook, you would put these chunks in cells.
MATLAB has a similar idea, where %% markers deliminate cells, which can
be executed with a single key press.
With this PR, you can define cells like this:
Now you can execute the two cells independently by moving the cursor into a cell and pressing
<Ctrl>+Enter.