Choose a file interactively

In R, the function file.choose() exists to choose files interactively. This is nice when sharing code with someone who is not a programmer. Is there anything similar in Julia?

1 Like
julia> using Gtk
julia> filename = open_dialog("My Open dialog")

thats it.


I had a similar desire and ended up writing a little solution that I had a question about here. I wanted something that used the native system dialog and that little code snippet has served me very well.

*edit: To be clear I did very little of the writing for this snippet. It’s based off the file dialog example in QML.jl. I just tweaked it a bit and converted it to one self-contained solution (code wise atleast, QML.jl obviously needs to be installed).

Thanks for your help everyone!