After Creating Python Exe File With Cx_freeze The File Doesn't Do Anything
I recently created used cx_freeze to create a python 3.2.2 exe file. When I tried to run the exe file nothing happened. Here is the code for my test.py file: print('hello world')
Solution 1:
My suggestion:
set
base = None(try it: maybe that's all you want?base = Win32GUIdoes "hide" the console - this is useful when you're building a GUI)In the same folder with your .exe make a batch-file (a text-file with .bat) calling your .exe:
this goes into your batch-file:
name-of-your-app.exe %1
PAUSE
You'll start your app by clicking the batch-file - it keeps the console open so you're able to reed the errors/output.
Solution 2:
Place a input() at the bottom of your code, and try again:
Looks like your .exe runs and exists before you can see anything, so place a input() at the bottom to make the script wait for user input before exiting.
print("hello world")
for i in range(5):
print(i)
input()
Post a Comment for "After Creating Python Exe File With Cx_freeze The File Doesn't Do Anything"