For legacy reasons, I develop and deploy code in Python 2.7 under Windows. In development, I use print to the CMD window for the usual reasons. When my code is compiled by py2exe for deployment, the print statements are still active, but I can’t see the output anymore – even if I run the EXE from a command line. Is there a way to see stdout of a python EXE?
Here is my setup.py:
from distutils.core import setup
import py2exe
setup(name="LineLogixPC",
version="1.1",
package_dir={"" : ""},
author="Xxxx Xxxxx",
author_email="[email protected]",
windows = [{
"script" : "LineLogixPC.py",
"icon_resources": [(1, "llpc.ico")]
},
],
options = {
"py2exe": {}
},
data_files=[('', ["llpc.ico"]),
("CloneTag", [r"CloneTagtext75x75.png", r"CloneTagURI75x75.png",
r"CloneTagBrowsers75x75.png", r"CloneTaghandx75.PNG", r"CloneTagextern75.PNG"]),
])
The related topics all seem to address capture of stdout from other EXE files running under Process and Popen. My problem is with my own Python 2.7 EXE file.