I want to access my files from wsl ubuntu but this format of code has syntax error only resolved by removing “$”, but that probably would cause Windows to fail accessing to my Ubuntu files.
HOME = joinpath(ENV[“HOME”], “//wsl$/Ubuntu/home/…”);
Can it be resolved by installing julia to my wsl ubuntu? Or is it possible to access wsl files from Windows with joinpath somehow I couldn’t manage to find.
Thanks in advance.
when using a raw string, you dont get probelms with “$” anymore.
julia> HOME = joinpath("//wsl$/Ubuntu/home")
ERROR: ParseError:
# Error @ REPL[34]:1:24
HOME = joinpath("//wsl$/Ubuntu/home")
# └ ── identifier or parenthesized expression expected after $ in string
Stacktrace:
[1] top-level scope
@ none:1
julia> HOME = joinpath(raw"//wsl$/Ubuntu/home")
"//wsl\$/Ubuntu/home"
2 Likes
Or you could escape the $
: "//wsl\$/Ubuntu/home"
1 Like