In my python script:
p = Popen('a.bat')
The problem is that the output of the batch file is put to main console window in which I executed my python script… I want the output of the batch file to be shown in new console window. Any help would be appreciated. Thanks.
You can set the
CREATE_NEW_CONSOLEflag. For example:The docs regarding
shell=Trueare inconsistent with the implementation. If you specifyshell=True, it setsCREATE_NEW_CONSOLEonly if the platform is either Win9x or uses the 16-bitCOMMAND.COMshell.