Hi All,
I'm trying to read output from a program and am having trouble with
the following three lines of code:
local proc = wx.wxProcess(wx.NULL, wx.wxPROCESS_REDIRECT)
local pid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC, proc)
local streamin = proc:GetInputStream()
The app crashes on any attempt to get input stream. The following code
with EXEC_SYNC works fine though:
local pid = wx.wxExecute(cmd, wx.wxEXEC_SYNC)
But this doesn't give me any way to access the output of the command I execute.
I suspect the problem is in the first parameter in wxProcess:
wx.wxProcess(wx.NULL, but I don't see any other way to not provide
wxEvtHandler or create a dummy one (replacing wx.NULL with
wx.wxEvtHandler() has the same effect: the app crashes).
This is all on windows 7 running fairly recent 2.8.12.2 code. I'd
appreciate any ideas on how to get program output. Thanks.
Paul.
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users