[Python.NET] Issues with running a phyton script from c#

Craig Farrow craig_farrow at sil.org
Mon Aug 17 10:57:15 CEST 2009

For running stand-alone python scripts you can rename your .py file to 
.pyw, which disables the console window when you run it. Does that 
achieve the same result from your C# code?


16/08/2009 4:05 p.m. dï, Mahi Haile pišdimiš:
> I am able to run a phyton script from C# using a code similar to:
> p = new Process()
> p.StartInfo.Filename = path/to/script
> p.StartInfo.Arguments = string_with_arguments
> p.StartInfo.CreateNoWindow = true
> p.Start()
> I am not interested in the script outcomes since the script just
> starts a Tk app with its own Gui.
> The problem/annoyance I am having is when the process starts, it does
> so with a command window that points to python instalation location
> (so something like C:\Python25\python.exe) and just hangs there until
> I quit the Tk gui. Is there a way to get rid of this command window?
> If I close the command window manually, the Tk app closes as well.
> Thank you for your help,
> ------------------------------------------------------------------------
> _________________________________________________
> Python.NET mailing list - PythonDotNet at python.org
> http://mail.python.org/mailman/listinfo/pythondotnet

More information about the PythonDotNet mailing list