Comments (7)
Thanks @TK-21st!
That would indeed be very useful. I guess another way would be to get a hold on the current notebook (either the current notebook or by accessing the currentWidget
from the notebook tracker), and get the session context with:
opts = notebook.sessionContext()
from ipylab.
By the way if you feel like opening a PR (even as a draft), please don't hesitate!
from ipylab.
By the way if you feel like opening a PR (even as a draft), please don't hesitate!
Just did! WIP on reporting the current kernel back.
Also I tried to define a bunch of HasTraits
to map the interface from JLab's Typescript API but I clearly do not understand how traitlets are supposed to work 🙄 so that's WIP too..
from ipylab.
The latest PR should have the feature necessary.
It was easy to show all sessions, since I can just expose app.serviceManager.sessions
It was a bit harder to make the currrentWidget work. I ended up exposing the private attribute app.shell._tracker
which gives me access to the currently in focused widget and go from there.
Need to figure out linter still but it is functional
from ipylab.
Thanks @TK-21st!
That would indeed be very useful. I guess another way would be to get a hold on the current notebook (either the current notebook or by accessing the
currentWidget
from the notebook tracker), and get the session context with:opts = notebook.sessionContext()
I opted for using tracker since I wanted to potentially get the session of console widgets too. Turns out that's not working.. Comm open error.
Looks actually like a problem with using ipywidget in console.
from ipylab.
opted for using tracker since I wanted to potentially get the session of console widgets too. Turns out that's not working.. Comm open error.
Looks actually like a problem with using ipywidget in console.
Right, the current JupyterLab widget manager does not handle consoles (yet).
from ipylab.
Fixed by #46.
from ipylab.
Related Issues (20)
- Convert notebook with ipylab HOT 2
- docmanager:open called from ipylab takes absolute paths HOT 3
- list_commands() not working HOT 3
- example not working HOT 5
- app.commands.execute("notebook:run-all-below") does not work if cell collapsed
- Vscode Jupyter Extension: Unable to find widget 'ipylab' version '^0.6.0' from configured widget sources.
- Initialise widgets without going through a notebook HOT 3
- Previous cell execution HOT 5
- Complete rest of Title API
- Args for commands? HOT 3
- Panel and SplitPanel do not always render initially HOT 9
- Removing panel
- Exposing Jupyter(Lab) Contents HOT 1
- Purpose and Use Cases for ipylab HOT 3
- Execute notebook programatically has different behavior from running it on a Jupyter Notebook UI
- Disable "save widget state automatically" via notebook command? HOT 3
- Support of notebooks in VS Code? HOT 3
- Best practice inserting code into next cell
- Adding menus? HOT 1
- Problem with split panel on Mac HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipylab.