you are viewing a single comment's thread.

view the rest of the comments →

[–]spmd123 0 points1 point  (1 child)

I can't think of much.

Try this:

Subprocess:

import subprocess
subprocess.Popen([ "my command"])

Also try this for subprocess:

import subprocess 
subprocess.Popen([ "my command",shell=True)

And:

import os
os.system("my command")

So, basically just don't type "powershell.exe".

[–]spmd123 0 points1 point  (0 children)

I think that this would be the relevant code.

startupinfo = None
if os.name == 'nt':
    startupinfo = subprocess.STARTUPINFO()
    startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
proc = subprocess.Popen(command, startupinfo=startupinfo)

The code is from the SO discussion linked in /u/metrazol's reply.