cmd/DOS window opens with GUI created with py2exe

396 views Asked by At

I have created a GUI using PyQt5. The aim of the GUI is to pass some input data (images, shapefiles etc) and to use them in softwares (GIS mostly).

To launch the GIS I use the subprocess.Popen command line. I have used py2exe to create my app and my problem is that a DOS/cmd opens whenever I launch an operation.

My setup file looks like this :

from distutils.core import setup
import py2exe
setup(    
      windows=[{'script':'D:\App\projet.pyw',
                'options':{'py2exe':{'includes':['sip', 'PyQt5.QtGui', 'PyQt5.QtCore', 'PyQt5.QtWidgets', 'qwindows']}},
                'icon_resources':[(1, 'D:\App\images\logo.ico')]

            }]
      )

A cmd window stills open, eventhough I use windows instead of console. And I tried with both .py and .pyw .

So I'm not sure if this is py2exe related or if it's because I am launching softwares through my GUI, but I would like the cmd window not to open, just the GUI to be opened.

1

There are 1 answers

0
guy16 On BEST ANSWER