Newbie question regarding py2exe.

Discussion in 'Python' started by Marco.LaRosa@csiro.au, Jul 24, 2003.

  1. Guest

    Hi all,

    This is a dumb question and I apologise.

    I have just started using py2exe and no matter what I try, I can't get it to
    work.

    Sometimes modulefinder.py complains, other times its VersionInfo.py.

    My question is how robust is py2exe? (Note that I have followed the docs to
    the letter.)

    Cheers, Marco
     
    , Jul 24, 2003
    #1
    1. Advertising

  2. writes:

    > Hi all,
    >
    > This is a dumb question and I apologise.
    >
    > I have just started using py2exe and no matter what I try, I can't get it to
    > work.
    >


    The only thing (IMO) you can do severely wrong is to create your scripts
    and your setup.py file in the lib/site-packages/py2exe directory. Use a
    different directory for that.

    > Sometimes modulefinder.py complains, other times its VersionInfo.py.


    If you only get warnings, that's ok. They are warnings;-)
    Look in the dist/... directory for an exe file (and the additional dlls/pyds).

    Thomas
     
    Thomas Heller, Jul 24, 2003
    #2
    1. Advertising

  3. Marco - talking about py2exe said

    >
    >Sometimes modulefinder.py complains, other times its VersionInfo.py.
    >
    >My question is how robust is py2exe? (Note that I have followed the docs to
    >the letter.)
    >
    >Cheers, Marco
    >


    I sympathize Marco.
    Last night I tryed py2exe for the very first time.

    I wrote a trivial random LOTTO Picker with GUI, as a test.
    Used anygui - trying it for the first time also.
    Just a few labels, a Button to gen the nums and a one line text box for
    display.
    Impressed with anygui, I moved on to py2exe.

    It worked ,,,,,,,eventualy.

    What I found was that...

    There are no where near enough docs for py2exe.

    Yeah there's plenty of info for distutils and setup scripts
    but the "lazy" hacker is looking for samples.

    A repository for donated, well doc'ed "setup.py" examples is
    IMHO needed. Write a working setup - doc it good - mail it to the archive.
    Donated because I can't expect Thomas Heller to
    imaginate\dream up every possible way to write one.

    I used the setup file for Aliens by
    that I found at PYGAME as an example.
    I hacked it and made it my slave and it did what I expected very well.

    It's amazingly robust - to answer your question above.

    I looked forward to the py2exe output to list my unfound dependencies.

    It did this very well.
    (aside = Please someone tell me
    how to capture the output to file in win32 comand line?
    I didn't see an option for that in the Doc at the website.)

    Writing the anygui script in Pythonwin made my backend( ) == mswgui.

    (sounds nasty don't it)
    This ment that all the anygui imports became the entire list of unresolved
    modules.

    I could only imagine that if I had gone ahead and resolved them all in the
    setup
    script I would still be resolving them now. ( Am I correct in assuming this
    would take
    me all the way down to Win32 sys dll's ? Anybody?)

    Fortunately, I remembered reading that if the originating script only included
    pure Python code, then the modulefinder should have no problems.

    Anygui to the rescue. Switched the backend to TKgui at the import statment.
    One little change and YIPPIE ! All done.
    That ment that the setup.py became as simple as ...

    # setup.py
    from distutils.core import setup
    import py2exe

    setup(name="myscript",
    scripts=["myscript.py"],
    )


    Made my little 1.76Kb script into a whoppin 2MEGABYTES --- and that's the zip
    file.

    I got the entire TCL\TK source in there. 189 files including my script and the
    Python dll
    at 5,096kb ,,,,,,,,,, 5.1 MEG and it only took about as much wait time to build
    as the zip
    file did to zip it.

    Does it all have to be in there? I'm fairly certain NO.

    One of these day's I'll have to add an --exclude statement or 100.
    But nobody's gonna want this proggy so why.

    UPSHOT -- I really like both programs and look forward to learing more about
    them.

    Robust? You bet !

    Ray St.Marie
     
    Raymond Arthur St. Marie II of III, Jul 24, 2003
    #3
    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. radiohead
    Replies:
    5
    Views:
    345
    Victor Bazarov
    Sep 26, 2003
  2. F. GEIGER
    Replies:
    0
    Views:
    923
    F. GEIGER
    Aug 16, 2004
  3. python
    Replies:
    3
    Views:
    1,806
    Simon Brunning
    May 22, 2006
  4. Chris Spencer

    Re: [Py2exe-users] py2exe 0.6.9 released

    Chris Spencer, Nov 17, 2008, in forum: Python
    Replies:
    3
    Views:
    574
    Pascal
    Dec 8, 2008
  5. Mark Hammond

    RE: [Py2exe-users] py2exe 0.6.9 released

    Mark Hammond, Nov 17, 2008, in forum: Python
    Replies:
    0
    Views:
    459
    Mark Hammond
    Nov 17, 2008
Loading...

Share This Page