I am trying to use run() or success() to execute a Python script from Julia.
I can run it fine if I specify the command by hand:
julia> run(`python sample.py`)
woo! sample
However, if I try to run it via a string argument, it suddenly does not work.
julia> str = "python sample.py"
"python sample.py"
julia> run( `$str` )
ERROR: could not spawn `'python sample.py'`: no such file or directory (ENOENT)
in _jl_spawn at process.jl:217
in spawn at process.jl:348
in spawn at process.jl:389
in run at process.jl:478
Specifying the full path for sample.py produces the same result. Oddly enough, just running python as a string does work:
julia> str = "python"
"python"
julia> run( `$str` )
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Am I doing something incorrectly?
Thank you