_isnotebook() does not recognise JupyterLite

Offen
#166 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

  • #167 von @petercorke — ohne Merge geschlossen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
jupyter, python
Bereich
tooling

Rechercherichtung

Start with _isnotebook() in base/imageio.py and the Camera image-plane reuse branch that depends on it. Check what get_ipython().__class__.__name__ returns inside a JupyterLite (Pyodide) session, then add that detection alongside the existing Colab and ZMQ checks. Done when the JupyterLite session takes the notebook branch. Confirm first whether the linked PR #167 (closed, unmerged) already covers this.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Likely smell. Worth checking out.

base/imageio.py _isnotebook() only matches a shell class named Shell (Colab) or ZMQInteractiveShell. It has no JupyterLite check; RTB added sys.platform == "emscripten". If the Pyodide shell has another name, Camera takes the desktop branch of its image-plane reuse in the browser. I have not checked what get_ipython().__class__.__name__ is in the MVTB Lite site.

RTB, MVTB and bdsim each have their own copy of this check. rai-opensource/spatialmath-python#271 adds environment() and isnotebook() to spatialmath.base, covering terminal, IPython, Jupyter, Colab and JupyterLite. Once it is released, this could use it.

Vorherrschende Sprache
Python
Sterne
225
Forks
35
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
33

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus petercorke/machinevision-toolbox-python

Alle Issues in petercorke/machinevision-toolbox-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.