Python packed exe screen blanks per second on windows, how to stop this?

I created the exe from the python GUI program that I put together, it all works fine as the function goes, but whenever someone starts it, their screen turns black for a second and then goes back to the windows and starts the program.

Is this a common problem? or it could be something specific to the code (it's very simple, just a weight calculator for a rectangular plate). The code is as follows (I used cxfreeze to package it). Note that I'm not a python programmer, it just seemed like this is the easiest way to do this using the GUI (I used easyGUI to create it):

import easygui as eg msg = "Enter Plate Information eg 9600 2400 6" title = "Plate dimensions" fieldNames = ["Width", "Length", "thickness"] fieldValues = [] fieldValues = eg.multenterbox(msg, title, fieldNames) width = float(fieldValues[0]) length= float(fieldValues[1]) thick= float(fieldValues[2]) 

(I forgot some error checking because it is just an if-else statement)

 fieldValues = eg.multenterbox(errmsg, title, fieldNames, fieldValues) total = (width * length * thick * 7.85) eg.msgbox(total / 1000000, "Kilograms") 

This happens with the code I put together and the code I downloaded for other things. All that was done through cxfreeze.

This is only a blank screen, which I see as a problem, I can clarify the code as soon as I recognize Python.

+4
source share
2 answers

Just in case, others come across this and look for an answer, not sure how "it is appropriate to answer my own question, but anyway: the reason for this is that somewhere along the line the command line window is set to" full screen mode "" by default, open a command prompt window, left-click in the upper left corner to get a drop-down list, and select "default", then make sure that "window" is selected and applies to all future windows.

This stops the black flickering / blanking of the screen because the python shell, if I can call it, which is executed in the DOS window before running the exe created with cxfreeze.

+2
source

cxfreeze program.py --base-name=Win32GUI

Note. . Using the --base-name=Win32GUI , the console window will not appear.

0
source

Source: https://habr.com/ru/post/1382811/


All Articles