3

I have created a simple tkinter GUI and when the submit button is pressed a CLI command is executed to launch a package installed/managed through pip. The package grabs information from a web page and puts it in a folder.

The problem lies when executing the CLI command from the gui.

I cannot just change the compiled package to pyw.

I tried launching it by using 'pythonw' instead of 'python' in the command that is executed from the gui when the button is clicked, but the command is not executed (i.e no information from the web page is copied into the designated folder).

If I launch it using 'python' instead of 'pythonw', then it works as expected.

It is already packaged up with as cx_freeze and works fine as exe, the only issue is the CMD that keeps popping up when the submit button is pressed.

Windows 7 btw

Even minimising it would do..

1 Answers1

1

Being a donut, solution is already on stack:

How do I hide the console when I use os.system() or subprocess.call()?

si = subprocess.STARTUPINFO()
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
subprocess.call('{command goes here}', startupinfo=si)