Tilak Madichetti Tilak Madichetti - 1 year ago 102
Python Question

Python to EXE builds a nothing-doing file

I used cx_Freeze module to convert my Python applications to Windows.

I have a simple Python file


print("Hi there !")

Another file
to convert the above into exe:

import sys
from cx_Freeze import setup, Executable

include_files = ['autorun.inf']
os_base = None

if sys.platform == "win32":
os_base = "Win32GUI"

description="Very cool puzzle",
executables=[Executable("norm.py", base=os_base)])

I also have
in the same folder.
There are also no errors coming when I build this by running command:

python makeup.py build

It creates a
folder inside which there is
.When I run this exe through my terminal , it doesn't do anything.I am expecting it to print
"Hi there!"

I am using Python 3.4 as some posts said that 3.5 has a problem with this module.

Answer Source

You are creating a GUI application using

if sys.platform == "win32":
    os_base = "Win32GUI"

You should remove this, in order to build a console application.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download