I built a tkinter app, then I converted it into a .exe
. When I run the .exe
, no console shows up.
But in the script, I wrote several print "stuff"
statements, how can I display them when I run the .exe
?
Run the .exe
from the console.
Easiest way to start the console is Start -> Run -> cmd.exe
Then cd
to the directory where the .exe
is, and run the .exe
.
Edit: If you used py2exe
, you may need to pass your script to setup()
as the console
argument:
setup(console=['hello.py'])
This will tell it you want console output. That's from the py2exe tutorial.
Also see Hiding console window of Python GUI app with py2exe, and do the opposite, since you don't want to hide the console output.