[mono-vb] Need help calling python program through mono

Rolf Bjarne Kvinge rolflists at ya.com
Wed Sep 16 03:02:44 EDT 2009


> Need help I am trying to execute a python program, but have been very
> unsuccessful.

In exactly which way unsuccessful? Error messages? Nothing happens?

> My program needs to open a new terminal window, 

This you can do (and I can't see anything obviously wrong with the code

> when the user click a
> command button, and display/run the python program.

It's the terminal that would have to do this (unless you can find a way to
remotely control the terminal window somehow, but I suspect it's a lot
easier to make the newly created terminal window execute a script that does

Once again, knowing what actually happens would make it easier to find the


> When the python
> program has finished it will close out.  Any advice would be greatly
> appreciated.
> Currently this is what I have tried.
>    Dim processStartInfo = New ProcessStartInfo("DISPLAY=:32 /root/rxvt
> -geometry 80x25+150+150+sb -fn 9x15 -e /path/ProgramName", param)
>                 processStartInfo.UseShellExecute = False
>                 processStartInfo.ErrorDialog = False
>                 processStartInfo.WindowStyle =
> ProcessWindowStyle.Normal
>                 processStartInfo.RedirectStandardError = True
>                 processStartInfo.RedirectStandardInput = True
>                 processStartInfo.RedirectStandardOutput = True
>                 processStartInfo.CreateNoWindow = False
>                 Dim process As New Process()
>                 process.StartInfo = processStartInfo
>                 Dim processStarted As Boolean = process.Start()


More information about the Mono-vb mailing list