Re: [julia-users] Get the OS
See here: http://docs.julialang.org/en/latest/stdlib/base/?highlight=windows#Base.@windows There are also the @windows_only ...code... @unix_only ...code @osx_only ...code @linux_only code... Or the variable name `OS_NAME` that will return the OS name as a symbol. Plenty of options :) On Tue, Dec 8, 2015 at 1:46 PM, Ben Wardwrote: > Hi, > > How can I check the OS in Julia? I thought it may be in the Getting Around > section of the reference manual but it's not. Basically I'd like to check > the OS to see if I should write to /dev/null or just NUL in the case of > windows. > > Thanks, > Ben. >
Re: [julia-users] Get the OS
I don't think Base.DevNull works for this at present, it only works for redirecting streams. On Tuesday, December 8, 2015 at 8:54:47 PM UTC, Yichao Yu wrote: > > Also > http://julia.readthedocs.org/en/latest/stdlib/base/?highlight=devnull#Base.DevNull > > > On Tue, Dec 8, 2015 at 3:53 PM, Jacob Quinn> wrote: > > See here: > > > http://docs.julialang.org/en/latest/stdlib/base/?highlight=windows#Base.@windows > > > > > There are also the > > > > @windows_only ...code... > > @unix_only ...code > > @osx_only ...code > > @linux_only code... > > > > Or the variable name `OS_NAME` that will return the OS name as a symbol. > > > > Plenty of options :) > > > > On Tue, Dec 8, 2015 at 1:46 PM, Ben Ward > wrote: > >> > >> Hi, > >> > >> How can I check the OS in Julia? I thought it may be in the Getting > Around > >> section of the reference manual but it's not. Basically I'd like to > check > >> the OS to see if I should write to /dev/null or just NUL in the case of > >> windows. > >> > >> Thanks, > >> Ben. > > > > >
Re: [julia-users] Get the OS
Also http://julia.readthedocs.org/en/latest/stdlib/base/?highlight=devnull#Base.DevNull On Tue, Dec 8, 2015 at 3:53 PM, Jacob Quinnwrote: > See here: > http://docs.julialang.org/en/latest/stdlib/base/?highlight=windows#Base.@windows > > There are also the > > @windows_only ...code... > @unix_only ...code > @osx_only ...code > @linux_only code... > > Or the variable name `OS_NAME` that will return the OS name as a symbol. > > Plenty of options :) > > On Tue, Dec 8, 2015 at 1:46 PM, Ben Ward wrote: >> >> Hi, >> >> How can I check the OS in Julia? I thought it may be in the Getting Around >> section of the reference manual but it's not. Basically I'd like to check >> the OS to see if I should write to /dev/null or just NUL in the case of >> windows. >> >> Thanks, >> Ben. > >