I have made a program in python that consists sys module. I want to convert that to an exe file using cx_Freeze. So I used the following code in the setup.py:
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
options = {"build_exe": {"includes": "atexit"}}
executables = [Executable("myfilename.py", base=base)]
setup(
name="simple_PyQt5",
version="0.1",
description="Sample cx_Freeze PyQt5 script",
options=options,
executables=executables,
)
When I run the command: python3 setup.py build it builds the folder build inside that, it has a folder named "exe.win-amd64-3.9" inside that, it has a folder named lib, myfilename.exe, python3.dll and python39.dll in the exe.win-amd64... When I run the myfilename.exe it opens and closes whereas I have an input() it asks me for that. so can you please help me that how can I use the sys module in the file that I want to convert to exe using cx_Freeze