X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c1718b2c8a1ae4e7f2a6f421cc398a21dfdb07cb..a9a04486a2fc7be11a42343070ff8dd859618c46:/wxPython/src/_process.i diff --git a/wxPython/src/_process.i b/wxPython/src/_process.i index 52f778d493..b256ae7114 100644 --- a/wxPython/src/_process.i +++ b/wxPython/src/_process.i @@ -78,7 +78,8 @@ IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); %} -%name(Process)class wxPyProcess : public wxEvtHandler { +%rename(Process) wxPyProcess; +class wxPyProcess : public wxEvtHandler { public: // kill the process with the given PID static wxKillError Kill(int pid, @@ -103,8 +104,9 @@ public: void _setCallbackInfo(PyObject* self, PyObject* _class); - void base_OnTerminate(int pid, int status); - + void OnTerminate(int pid, int status); + %MAKE_BASE_FUNC(Process, OnTerminate); + // call Redirect before passing the object to wxExecute() to redirect the // launched process stdin/stdout, then use GetInputStream() and // GetOutputStream() to get access to them @@ -164,7 +166,12 @@ enum // under Unix, if the process is the group leader then killing -pid kills // all children as well as pid - wxEXEC_MAKE_GROUP_LEADER = 4 + wxEXEC_MAKE_GROUP_LEADER = 4, + + // by default synchronous execution disables all program windows to avoid + // that the user interacts with the program while the child process is + // running, you can use this flag to prevent this from happening + wxEXEC_NODISABLE = 8 }; @@ -181,7 +188,11 @@ long wxExecute(const wxString& command, { PyObject* o; o = PyInt_FromLong((long) (*$1)); +#if SWIG_VERSION < 0x010328 $result = t_output_helper($result, o); +#else + $result = SWIG_Python_AppendOutput($result, o); +#endif } int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError* rc, int flags = wxKILL_NOCHILDREN);