vbx_wx -6 Junior Poster

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)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.