py2exe-created exe results in "application failed to initialize"

Discussion in 'Python' started by Rick King, Aug 7, 2009.

  1. Rick King

    Rick King Guest

    Hi everyone,
    I want to package up an application into an exe using py2exe but the
    result produces the dreaded

    "application failed to initialize 0x....142" error.

    I'm using wxPython and basically just took the sample for wxpython GUI
    that came with py2exe and changed the name. My setup is python 2.6,
    wxpython 2.8. My setup.py looks like the following.

    from distutils.core import setup
    import py2exe
    import sys

    class Target:
    def __init__(self, **kw):
    self.__dict__.update(kw)
    # for the versioninfo resources
    self.version = "0.1"
    self.company_name = "OWDC"
    self.copyright = "no copyright"
    self.name = "FileTool"

    manifest_template = '''
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    ..... etc.
    '''

    RT_MANIFEST = 24

    FileTool = Target(
    description = "FileTool",
    script = "filetoolGUI.py",
    other_resources = [(RT_MANIFEST, 1, manifest_template %
    dict(prog="FileTool"))],
    dest_base = "FileTool")

    setup(
    options = {"py2exe": {"compressed": 1,"optimize": 2,"ascii":
    1,"bundle_files": 1}},
    zipfile = None,
    windows = [FileTool],
    )

    Any help will be greatly appreciated!

    Rick King
    Southfield MI USA
     
    Rick King, Aug 7, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. F. GEIGER
    Replies:
    0
    Views:
    951
    F. GEIGER
    Aug 16, 2004
  2. python
    Replies:
    3
    Views:
    1,885
    Simon Brunning
    May 22, 2006
  3. Replies:
    0
    Views:
    1,824
  4. imageguy

    py2exe - change name of exe created

    imageguy, Sep 7, 2007, in forum: Python
    Replies:
    0
    Views:
    278
    imageguy
    Sep 7, 2007
  5. Prajakta
    Replies:
    0
    Views:
    617
    Prajakta
    Feb 2, 2008
Loading...

Share This Page