- 1

.py document error

Help !!, when I execute the line from a .py document, it closes after entering the values, without being able to observe the results well, how can I solve it?

7th Nov 2020, 3:26 PM
AlucardMiguel
AlucardMiguel - avatar
6 odpowiedzi
+ 10
AlucardMiguel , if you have to run a code that will close the output window direct after execution, you can add a simple print() statement as last line to your code. This stops the program until you have pressed any key.
7th Nov 2020, 7:31 PM
Lothar
Lothar - avatar
+ 1
Open it using code editors
7th Nov 2020, 3:43 PM
Shadoff
Shadoff - avatar
+ 1
Oh, in that case create simple gui, using tkinter, and then build executable file (blabla.exe) using py installer
7th Nov 2020, 3:55 PM
Shadoff
Shadoff - avatar
+ 1
Thank you very much, the solution I found was: at the end of all the code I wrote: end = input ("Press Enter to close") and voila the problem is solved
7th Nov 2020, 9:32 PM
AlucardMiguel
AlucardMiguel - avatar
0
many thanks friends
7th Nov 2020, 4:08 PM
AlucardMiguel
AlucardMiguel - avatar
- 1
yes, but my goal is that whoever executes that program does what I request, without seeing my lines of code
7th Nov 2020, 3:46 PM
AlucardMiguel
AlucardMiguel - avatar