FAQ
Hi all !

I'm working on Windows XP, with Python24.
I've a trouble with PyWinTypes24.dll (python Windows extensions).
Trouble is not due to specific python version 24.

To distribute my applications, I don't want to put anything else
elsewhere (neither in Windows/System32 nor in registry).
So I deliver a folder (says HOME) that contains two mains folders
- a folder Python24 that contains python distribution and
msvcr71.dll, python24.dll, PyWinTypes24.dll
- a folder apps that contain a folder per python application

I start my python applications with such command :
HOME/Python24/Python HOME/apps/app1/run.py
Windows complains that it cannot found PyWinTypes24.dll.
If I copy PyWinTypes24.dll in each HOME/apps/appX folder, then it
works.
It's a solution but not very nice.
Is there a solution without duplicate PyWinTypes24.dll ?

Thanks,
Alain

Search Discussions

  • Thomas Heller at Oct 28, 2004 at 1:02 pm

    alain.marcel at svd-info.fr (Alain) writes:

    Hi all !

    I'm working on Windows XP, with Python24.
    I've a trouble with PyWinTypes24.dll (python Windows extensions).
    Trouble is not due to specific python version 24.

    To distribute my applications, I don't want to put anything else
    elsewhere (neither in Windows/System32 nor in registry).
    So I deliver a folder (says HOME) that contains two mains folders
    - a folder Python24 that contains python distribution and
    msvcr71.dll, python24.dll, PyWinTypes24.dll
    - a folder apps that contain a folder per python application

    I start my python applications with such command :
    HOME/Python24/Python HOME/apps/app1/run.py
    Windows complains that it cannot found PyWinTypes24.dll.
    If I copy PyWinTypes24.dll in each HOME/apps/appX folder, then it
    works.
    It's a solution but not very nice.
    Is there a solution without duplicate PyWinTypes24.dll ?
    You should look into, and probably change, win32\lib\pywintypes.py,
    which is the module that loads pywintypesXY.dll with some magic.

    Thomas
  • Peter Hansen at Oct 29, 2004 at 3:04 pm

    Alain wrote:
    I'm working on Windows XP, with Python24.
    I've a trouble with PyWinTypes24.dll (python Windows extensions).
    Trouble is not due to specific python version 24.

    To distribute my applications, I don't want to put anything else
    elsewhere (neither in Windows/System32 nor in registry).
    So I deliver a folder (says HOME) that contains two mains folders
    - a folder Python24 that contains python distribution and
    msvcr71.dll, python24.dll, PyWinTypes24.dll
    - a folder apps that contain a folder per python application

    I start my python applications with such command :
    HOME/Python24/Python HOME/apps/app1/run.py
    Windows complains that it cannot found PyWinTypes24.dll.
    If I copy PyWinTypes24.dll in each HOME/apps/appX folder, then it
    works.
    It's a solution but not very nice.
    Is there a solution without duplicate PyWinTypes24.dll ?
    Is there any reason you aren't just using py2exe and creating
    a proper Windows installer (with, say, InnoSetup), instead
    of doing it the hard way?

    If for some reason you really insist on avoiding any changes
    to the registry (which InnoSetup will probably make for you,
    automatically), then you could just distribute a .zip of
    the dist folder py2exe creates. Still no problems such
    as you are facing above.

    -Peter
  • Alain at Nov 2, 2004 at 9:15 am
    Hi !

    The solution is simply to import PyWinTypes before any win32 import.
    This realizes the magic!

    Thanks.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedOct 28, '04 at 12:22p
activeNov 2, '04 at 9:15a
posts4
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase