Ok, for this purpose I think you can use the existing `displayable`
function:

http://docs.julialang.org/en/release-0.3/stdlib/io-network/#Base.displayable

 See how it is used to check various MIME capabilities in PyPlot:

https://github.com/stevengj/PyPlot.jl/blob/11c043170f86ea57eac35165c4a649e363028d02/src/PyPlot.jl#L15-L31

On Fri, Jun 26, 2015 at 3:14 PM, Josef Heinen <[email protected]> wrote:

> Hi,
>
> isdefined(:Juno) || isdefined(:IJulia) || ... seems to work fine. Thanks
> for your help ...
>
> Right now, when using the GR framework (GR.jl), the user has to decide,
> whether the software should produce inline graphics (in Jupyter or Juno) or
> open a new canvas (X / GDI / Cocoa - depending on the OS) using the
> GR.inline() function. It would be more convenient, if the software could
> detect whether we are in a GUI environment or in a simple terminal session
> and set a reasonable operation mode as default ...
>
> Here are some examples:
>
>    - Matplotlib animation example
>    <http://pgi-jcns.fz-juelich.de/pub/doc/JuliaCon_2015/anim.html>
>    - A molecular dynamics example
>    <http://pgi-jcns.fz-juelich.de/pub/doc/JuliaCon_2015/700K_460.html>
>
>
> Thanks,
> Josef
>
>
> On Friday, June 26, 2015 at 9:50:00 AM UTC-4, Josef Heinen wrote:
>>
>> Can anybody tell me, how to find out, whether we are running in a
>> "simple" terminal session or in a GUI environment (Juni, Jupyter, ...) ?
>>
>

Reply via email to