Saturday, March 24, 2018

convert python program to exe using cx_Freeze

program.py


import time
print('deven')
time.sleep(15)


setup.py


from cx_Freeze import setup, Executable
setup(name = "deven" ,
      version = "0.1" ,
      description = "" ,
      executables = [Executable("program.py")])


in cmd to working directory

python setup.py build


other options for setup.py


import sys
from cx_Freeze import setup, Executable

setup(
    name = "Any Name",
    version = "3.1",
    author="Deven",
    description = "simple program",
    executables = [Executable(script="program.py",base = "Win32GUI",icon="icon.ico")])

//base32 applications doesn't run on 64 bit machines




No comments:

Post a Comment