Kodi Community Forum

Full Version: python subprocess behaviour question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

in my plugin i'm calling an external powershell script with subprocess.check_output. When i do this from the python command line (version 2.7.14) it doesn't open any powershell window but just runs the command in the background. However when i do the same from within kodi it opens a powershell window. Which is a bit ugly for the plugin.
Well and now i kind of want to understand why this behaviour is so inconsistent. Or even better if anyone has a clue how to get rid of the window opening in kodi.
I know there is flag for the powershell to not open when running a script but this doesn't really work since the powershell window is still opening for a second.

Thanks & Regards
Takezo36
https://msdn.microsoft.com/en-us/library...s.85).aspx

Code:
subprocess.check_output(cmd, creationflags=0x08000000)
Hi thanks gonna give that a try.
Thanks that did indeed do the trick.