Nathann Cohen wrote:
> Hello everybody,
>
> In #18289 [2], Volker is improving the Notebook interface by making
> some objects be automatically plotted by __repr__ [1]
>
> graphs.PetersenGraph() # this graph is plotted
>
> or
>
> P = posets.ChainPoset(10) # no plot
> P # here, P is plotted
I'm actually more interested in what happens in the console; I don't
want to get *any* pop-up windows unless I explicitly ask for them.
My 0.2e-15 ct,
-leif
┌────────────────────────────────────────────────────────────────────┐
│ SageMath Version 6.7.beta3, Release Date: 2015-04-28 │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: graphs.PetersenGraph()
Launched png viewer for Petersen graph: Graph on 10 vertices
sage:
... and nothing happens, no error messages, no windows at all.
(Setting SAGE_BROWSER to e.g. xdg-open doesn't make a difference.)
sage: sage.misc.viewer.browser()
'sage-native-execute xdg-open'
sage: sage.misc.viewer.png_viewer()
'sage-native-execute xdg-open'
sage: !xdg-open
xdg-open - opens a file or URL in the user's preferred application
Synopsis
xdg-open { file | URL }
xdg-open { --help | --manual | --version }
Use 'man xdg-open' or 'xdg-open --manual' for additional info.
sage:
And yes, e.g.
$ xdg-open ~/.sage/ipython-3.1.0/kernels/sage_6_7_beta3/logo-64x64.png
works as expected.