What could be happening is that `gm.exe` is printing that message to STDERR, which is not captured by `readall()`. In theory, the new pipeline infrastructure should let you capture STDERR, but I haven't had the time to figure out exactly how. Maybe somebody who knows will chime in.
-- mb On Fri, Sep 11, 2015 at 9:17 PM, J Luis <[email protected]> wrote: > Found a ignorestatus function. Better, but not yet good enough. It still > prints a message even if using a suppression ';' > > julia> readall(ignorestatus(cm)); > C:/programs/GraphicsMagick/gm.exe compare: image difference exceeds limit > (0.336711 > 0.001). > > > sábado, 12 de Setembro de 2015 às 02:00:25 UTC+1, J Luis escreveu: >> >> Thanks. It turned out my main error was that I was build the Cmd object >> by first creating the command as a string and after wrapping it in back >> ticks. >> >> But I continue in troubles. Right, I can run the command, a GraphicsMagic >> image comparison command, but when that comparison say the two images are >> different gm.exe returns an error code != 0 and Julia interprets it a >> command error. But it isn't, it only means the two images are different. As >> a consequence the julia function where this happens aborts (an example in >> REPL bellow). >> >> I tried with a try catch but not even that prevented the function >> abortion. How can I get out of this one? >> >> julia> readall(cm) >> C:/programs/GraphicsMagick/gm.exe compare: image difference exceeds limit >> (0.33549 > 0.001). >> ERROR: failed process: Process(`C:/programs/GraphicsMagick/gm.exe compare >> -density 200 -maximum-error 0.001 -highlight-color magenta -highlight-style >> assign -metric rmse -file V:/example_02.png >> C:/progs_cygw/GMTdev/gmt5/branches/5.2.0/doc/examples/ex02/example_02.ps >> V:/example_02.ps`, ProcessExited(1)) [1] >> in pipeline_error at process.jl:548 >> >> sábado, 12 de Setembro de 2015 às 01:17:57 UTC+1, Simon Kornblith >> escreveu: >>> >>> readall(`cat test`) or similar >>> >>> On Friday, September 11, 2015 at 7:56:43 PM UTC-4, J Luis wrote: >>>> >>>> Ok, I've spend about an hour around "run" "open", "run(pipeline(..." >>>> but no way. >>>> In Matlab I would do >>>> >>>> [status, cmdout] = system(cmd); >>>> >>>> but in Julia the most a can reach is to run the command >>>> >>>> com = "C:/programs/GraphicsMagick/gm.exe compare -density 200 ... >>>> >>>> run(`com') >>>> >>>> but I need the result of that execution. >>>> How to? >>>> >>>> Thanks >>>> >>>> >>>> >>>> >>>>
