py2exe copies to much dlls

Discussion in 'Python' started by Achim Domma, Sep 4, 2003.

  1. Achim Domma

    Achim Domma Guest

    Hi,

    I managed to build a simple com server with py2exe. My script only imports
    codecs and re, but the dist folder contains tcl84.dll, tk84.dll and
    win32ui.pyd. Can somebody tell me why? And how to prevent this? I don't do
    any gui stuff, so where does the dependency comes from?

    regards,
    Achim
    Achim Domma, Sep 4, 2003
    #1
    1. Advertising

  2. Achim Domma

    Peter Hansen Guest

    Achim Domma wrote:
    >
    > I managed to build a simple com server with py2exe. My script only imports
    > codecs and re, but the dist folder contains tcl84.dll, tk84.dll and
    > win32ui.pyd. Can somebody tell me why? And how to prevent this? I don't do
    > any gui stuff, so where does the dependency comes from?


    Can you py2exe the following script and see what you get? If it's
    still the same stuff, post the py2exe setup.py script you used and
    the command line:

    # test script

    print 'Hello, world!'

    (Yes, that's all... :)

    -Peter
    Peter Hansen, Sep 4, 2003
    #2
    1. Advertising

  3. Achim Domma

    Anand Pillai Guest

    py2exe finds module paths by parsing your python source file.
    I think it also uses the PYTHONPATH environmenet variable.
    So if your PYTHONPATH contains $PYTHON/lib-tk (which it normally
    does), py2exe will copy the tcl/tk dlls too into the build
    directory, which are needed for tkinter.

    Try editing the PYTHONPATH variable and remove the lib-tk
    directory from it.

    HTH

    -Anand

    Peter Hansen <> wrote in message news:<>...
    > Achim Domma wrote:
    > >
    > > I managed to build a simple com server with py2exe. My script only imports
    > > codecs and re, but the dist folder contains tcl84.dll, tk84.dll and
    > > win32ui.pyd. Can somebody tell me why? And how to prevent this? I don't do
    > > any gui stuff, so where does the dependency comes from?

    >
    > Can you py2exe the following script and see what you get? If it's
    > still the same stuff, post the py2exe setup.py script you used and
    > the command line:
    >
    > # test script
    >
    > print 'Hello, world!'
    >
    > (Yes, that's all... :)
    >
    > -Peter
    Anand Pillai, Sep 4, 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. Thomas Heller
    Replies:
    1
    Views:
    381
    Thomas Heller
    Aug 19, 2003
  2. F. GEIGER
    Replies:
    0
    Views:
    895
    F. GEIGER
    Aug 16, 2004
  3. python
    Replies:
    3
    Views:
    1,749
    Simon Brunning
    May 22, 2006
  4. cpp4ever
    Replies:
    3
    Views:
    354
    Francesco
    Sep 8, 2009
  5. Raymond Schanks
    Replies:
    0
    Views:
    488
    Raymond Schanks
    Apr 11, 2010
Loading...

Share This Page