网上搜的都是老版本的情况,在本机上(Julia 1.3)实验一直报错
ERROR: LoadError: UndefVarError: print_with_color not defined
help?> print_with_color
search:
Couldn't find print_with_color
Perhaps you meant printstyled
No documentation found.
Binding print_with_color does not exist.
julia> printstyled("Hello", color=:green)
Hello
help?> printstyled
search: printstyled
printstyled([io], xs...; bold::Bool=false, color::Union{Symbol,Int}=:normal)
Print xs in a color specified as a symbol or integer, optionally in bold.
color may take any of the values :normal, :default, :bold, :black, :blink, :blue, :cyan, :green, :hidden,
:light_black, :light_blue, :light_cyan, :light_green, :light_magenta, :light_red, :light_yellow, :magenta, :nothing,
:red, :reverse, :underline, :white, or :yellow or an integer between 0 and 255 inclusive. Note that not all
terminals support 256 colors. If the keyword bold is given as true, the result will be printed in bold.
还能这么用呢,多谢
也有个包可以使