0

I found this answers on Stackoverflow but nothing works for me

I'm trying to hide console window, on windows at least. But with solutions above still I have window open

The only difference maybe I have to mark, I run python application with process from C# application, but as I understand it can't be a reason of some key different if I write all directives from the python code. Now I'm not sure how to figure out

1
  • From .NET you could set CreateNoWindow in the ProcessStartInfo. I don't understand why the support for CreateProcess flags is so lacking in .NET. They should support DETACHED_PROCESS. Commented Dec 7, 2016 at 20:31

1 Answer 1

5

You need to use the pythonw.exe program as it won't open a terminal when ran.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes I'm going to mark it as answer, thanks, one question, I want use it for executable on user computer by exist environment variable path given from C#. So question is if there any different for this case, if Process.Start("python.exe", pyscrpt); or as you said Process.Start("pythonw.exe", pyscrpt);?
Assuming both are on your PATH environment variable, it should work fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.