I wrote some statements like below:
os.system(cmd) #do something subprocess.call(\'taskkill /F /IM exename.exe\')
both will pop up a consol
Try to change the extension from .py to .pyw
Its basically just a Python User Interface file. So it opens up a new Window without the command line. chech this link (filext.com/file-extension/PYW)