Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
merge develop into master

See merge request Scientific-IT-Systems/python-gr!292
  • Loading branch information
jheinen committed Jan 2, 2025
2 parents 89e5953 + ac32d5b commit 9326391
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 58 deletions.
10 changes: 7 additions & 3 deletions gr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2733,11 +2733,14 @@ def show():
emergencyclosegks()
if _mime_type == 'svg':
try:
data = open('gks.svg', 'rb').read()
data = open('gks.svg', 'r').read()
except IOError:
return None
if not data:
return None
if 'marimo' in sys.modules:
from marimo import Html
return Html(data)
content = SVG(data=data)
display(content)
elif _mime_type == 'png':
Expand Down Expand Up @@ -4520,6 +4523,7 @@ def version():
VOLUME_WITHOUT_BORDER = 0
VOLUME_WITH_BORDER = 1

# automatically switch to inline graphics in Jupyter Notebooks
if 'ipykernel' in sys.modules:
# automatically switch to inline graphics in Jupyter or Marimo notebooks
if 'ipykernel' in sys.modules or 'marimo' in sys.modules:
inline()

Loading

0 comments on commit 9326391

Please sign in to comment.