Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear master

I am a newbie in python.I want to ask something about compiling python py2exe.
How to make exe file with py2exe without py code in the folder dist..


Thank's in advanced

What I have tried:

from distutils.core import setup
import py2exe, sys, os

module_excludes = []

packages= [
    'reportlab',
    'reportlab.lib.units',
    'reportlab.lib.pagesizes',
    'reportlab.lib',
    'reportlab.pdfbase',
    'reportlab.pdfgen',
    'reportlab.platypus',
    'reportlab.pdfbase.ttfonts',
    'reportlab.pdfbase.pdfmetrics',
    'reportlab.lib.styles',
    'pyPdf','num2words',
]



setup(console=['menu_aacs.py'],data_files=(["thn_ke_nol_lbh_satu.py","list_tpc_novie.py","rls_date_novie.py","incstat.py","detinc.py","commprod.py","othinc_prod.py","tax10.py","alam.gif",
                                            "othinc_period_tax.py","othinc_prod.py","comm_ipbr.py","popuphelp.py","delitabelpdf.py","helpbasedonnpk.py",
                                            "helpbasedonnpol.py"]),      # change to windows=[...]
    options = {
        "py2exe": { "dll_excludes": ["MSVCP90.dll","api-ms-win-core-processthreads-l1-1-2.dll",
                                     "api-ms-win-core-sysinfo-l1-2-1.dll","api-ms-win-core-file-l2-1-0.dll",
                                     "api-ms-win-core-heap-l2-1-0.dll","api-ms-win-core-delayload-l1-1-1.dll",
                                     "api-ms-win-core-errorhandling-l1-1-1.dll","api-ms-win-core-profile-l1-1-0.dll",
                                     "api-ms-win-core-libraryloader-l1-2-0.dll","api-ms-win-core-string-obsolete-l1-1-0.dll",
                                     "api-ms-win-security-activedirectoryclient-l1-1-0.dll","Secur32.dll","shfolder.dll"],
                    "packages": packages}
                  }
  )
Posted
Updated 26-Sep-18 18:27pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900