Thread: .exe wrapper?

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    73
    Rep Power
    11

    .exe wrapper?


    I was wondering if there is a good .exe wrapper besides py2exe, because I cant get it to work. I tried to use it on the following code in wxPython (I bolded the comment so you know where to look):

    Code:
    from wxPython.wx import *
    
    class MyApp(wxApp):
        def OnInit(self):
            frame = wxFrame(NULL, -1, "Psy Pwns")
            frame.Show(true)
            self.SetTopWindow(frame)
            return true
    
    app = MyApp(0)
    app.MainLoop()
    
    # This is where I start py2exe
    from distutils.core import setup
    import py2exe
    
    setup(console=["client.py"],
    options = {"py2exe": {"packages": ["encodings"]}},
    )
    and when I go to run, it runs. But I dont see any compiled .exe?
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    This guide might be helpful - let me know
    Py2exe guide

    grimey
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    73
    Rep Power
    11
    Well I tried py2exe and its safe to say that it sucks the fat one. Is there an exe wrapper that won't require me to send several mb of additional files and dlls along with the exe for it to work?

    I want to distribute stuff, but I dont want everyone to have to download libraries to run it, and I dont want to burden everyone with several files to run the .exe for something that should not take up much space at all.

    Perhaps Python just isnt the right language for me
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    1
    Rep Power
    0
    I have a similar problem: I'm following the instructions, and it seems to work, I get a dist folder with a library.zip in it - but no exe.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    17
    Rep Power
    0
    I want to distribute stuff, but I dont want everyone to have to download libraries to run it, and I dont want to burden everyone with several files to run the .exe for something that should not take up much space at all
    This is impossible. If you're using other peoples code you're going to need to either include it or have people d/l the appropriate libraries.

    EDIT - oh yeah. Everything you ever wanted to know abotu py2exe

    http://starship.python.net/crew/theller/py2exe/
  10. #6
  11. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    Originally Posted by Immortal Wombat
    I have a similar problem: I'm following the instructions, and it seems to work, I get a dist folder with a library.zip in it - but no exe.
    When py2exe does its stuff it prints out what it does - you can capture it and post it here - we might be able to help.

    start setup.py py2exe > alog.txt

    will run the script and put the story into a text file for you.

    grim
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Colorado, USA
    Posts
    68
    Rep Power
    11
    Originally Posted by Rayman1986
    Well I tried py2exe and its safe to say that it sucks the fat one. Is there an exe wrapper that won't require me to send several mb of additional files and dlls along with the exe for it to work?

    I want to distribute stuff, but I dont want everyone to have to download libraries to run it, and I dont want to burden everyone with several files to run the .exe for something that should not take up much space at all.

    Perhaps Python just isnt the right language for me

    I found this great NSIS(Nullsoft installer Script) that creates one executable containing all of your compiled code(library.zip,python*.dll,etc.)
    http://starship.python.net/crew/thel...FileExecutable

    This basically creates a standalone compressed exe that on startup, extracts the needed files to the temp dir, runs your python app.exe , and when you quit, it deletes the temp files.

    If you play with NSIS, you can easily build a nice installer that contains all of your py2exe compiled code, so your users aren't bothered by downloading all of the files.

    Don't give up yet---there are still plenty of great options out there.

IMN logo majestic logo threadwatch logo seochat tools logo