view raw
Tilak Madichetti Tilak Madichetti - 6 months ago 51
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("", base=os_base)])

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

python 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.


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.