I want to open a process in the background and it should be invisible in both Linux and Windows. I made something like this, but I don't know the console still appears on the screen:
command = "cmd /C dir c:\\"
startupinfo = None
if os.name == 'nt':
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _subprocess.SW_HIDE
proc = subprocess.Popen(command, startupinfo=startupinfo)