How to I print the current path?

1,294 views
Skip to first unread message

J Luis

unread,
Feb 17, 2014, 7:01:28 PM2/17/14
to julia...@googlegroups.com
I searched he docs (and Googled) but found no found no way to print the path. The obvious attempt failed

```
julia> path()
ERROR: path not defined
```

Tobias Knopp

unread,
Feb 17, 2014, 7:04:44 PM2/17/14
to julia...@googlegroups.com
pwd()

J Luis

unread,
Feb 17, 2014, 7:13:49 PM2/17/14
to julia...@googlegroups.com
No, that's the current working directory like in unix. What I want is the path as seen from julia (e.g the same as "path" on Windows or echo $PATH on unix). I am trying to see if the images package works and for that I have set the ImakeMagick path to the Windows path and have it inherit from julia.bat but still get an error saying

julia> using Images
WARNING: ImageMagick utilities not found. Install for more file format support.

John Myles White

unread,
Feb 17, 2014, 7:15:07 PM2/17/14
to julia...@googlegroups.com
On UNIX, you can do ENV["PATH”]

Not sure about Windows.

— John

Tobias Knopp

unread,
Feb 17, 2014, 7:19:15 PM2/17/14
to julia...@googlegroups.com
ENV["PATH"]

J Luis

unread,
Feb 17, 2014, 7:26:04 PM2/17/14
to julia...@googlegroups.com
OK, thanks but it would be nice to have a path() function that do just that since I'm sure that will be the first attempt of every newcomer and very much on the spirit of, for instance, pwd()

Tim Holy

unread,
Feb 17, 2014, 8:57:24 PM2/17/14
to julia...@googlegroups.com
Re Images: there is a build script which I haven't tested myself, but which in
theory should do everything for you. It was updated recently, because the
ImageMagick binary downloads changed (and they don't provide a "latest" link).
What if you check out Images master, update, and if necessary execute
Pkg.build("Images")?

I also added support for the MAGICK_HOME environment variable, and failing all
else you can do the Windows equivalent of Base.push!(Base.DL_LOAD_PATH,
"/opt/local/lib").

--Tim

J Luis

unread,
Feb 17, 2014, 9:38:44 PM2/17/14
to julia...@googlegroups.com
Hmm, this is getting a bit off topic. I'll reply on the issue Images #68 where this belongs
Reply all
Reply to author
Forward
0 new messages