Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Julia: print_with_color() in terminal

Tags:

julia

If my script run_this.jl contains the following, single line of code:

print_with_color(:green, "Hello")

and I run the script in the terminal as julia run_this.jl, it does not print in color. Is there a way to make this function work when I run a julia script in the terminal?

like image 258
Cokes Avatar asked Jun 13 '16 16:06

Cokes


1 Answers

You can use the color option when calling your julia script. E.g.

julia --color=yes run_this.jl

That works for me on mac osx and linux. Not sure about windows.

like image 92
Michael Ohlrogge Avatar answered Nov 18 '22 13:11

Michael Ohlrogge