Executing JShell commands from within notebook
See original GitHub issueWe are evaluating the use of the IJava kernel as part of an introductory course on (Java) programming. It looks very promising, esp. because it nicely integrates with nbgrader. We wondered how one would execute JShell commands from within a notebook, like /vars
? Via magics?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Executing terminal commands in Jupyter notebook
Might be useful for others. Use ! followed by terminal command you want to execute. To run a shell command. E.g., ! pip...
Read more >IPython and Shell Commands | Python Data Science Handbook
IPython bridges this gap, and gives you a syntax for executing shell commands directly from within the IPython terminal. The magic happens with...
Read more >Shell commands in IPython - Jupyter Tutorial 0.9.0
The IPython Notebook allows simple UNIX/Linux commands to be executed in a single input cell. There are no limits but when using, please...
Read more >Running Shell Commands in Jupyter Notebook - YouTube
This video demonstrates how to run shell commands in jupyter notebook itself.
Read more >Running Shell Commands Inside Jupyter Notebook - YouTube
... execute shell command in jupyter notebook, run shell script in jupyter notebook, shell commands, linux commands, running shell commands ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mrcalvin A comment related with
%open
magic: there is already a%load
magic which loads and executes a given notebook. I use this approach to set up a notebook for bootstrap my library and I suppose it is quite useful.Thanks for the informative reply (tool vs. API)! In fact, when cross-reading the doc on available jshell commands and the API doc, I think an immediately useful starting point would be introspection commands (as they map 1:1 to
JShell
methods):%vars
:variables
%types
:types
%methods
:methods
%imports
:imports
I wondered whether a variant of
%open
would also be nice, to pick up snippets from a script relative to a given notebook (like a cross-notebook startup script)? This could be used to stage a certain, shared environment of methods and variables, for different students to start working from common grounds. Also, sth. like%save
would be nice, to collect all evaluated snippets into a dump script (to maybe re-process them independently from the Jupyter notebook environment).