473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error import PyWinTypes24.dll

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
Jul 18 '05 #1
3 1773
al**********@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
Jul 18 '05 #2
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
Jul 18 '05 #3
Hi !

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

Thanks.
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Julien Cigar | last post by:
Hello, I'm using mod_python 3.1.3 with Apache 2.0.54 on a Debian box with the publisher handler and the Clearsilver template engine, and from time to time apache returns an 500 error code...
9
by: M.N.A.Smadi | last post by:
HI; I am having the following error. I am using someone else's code and all they are doing is pass an argv to a function then def execute_action(manager, argv): method_name =...
3
by: Neter Smith | last post by:
I have run into a problem when trying to import a WSDL reference under VS 2003 and 1.1 of the framework. It appears as if it is in the generation of the proxy that things are failing. When I...
6
by: jasn | last post by:
Hello I am getting the following error message when I try and send an XML sting to a web service, I read somewhere that most web services prefer ascii and some throw errors when using unicode so...
0
by: David T | last post by:
Has anyone run across this error? When calling any of several visualization routines from FiPy, Python quits with a Bus Error I'm using MacOS X Tiger 10.4.3, and I've tried several builds...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
0
by: Subanesh | last post by:
Hi All, Am new to using HTMLUnit.I wrote a sample code(to emulate opening of website google.com and enter a value say "html" in the text field and click the Search button) .The code is as follows...
0
by: shahiz | last post by:
This the error i get when i try to run my program Error: Unable to realize com.sun.media.amovie.AMController@18b81e3 Basically i have a mediapanel class that initialize and play the media as...
7
by: svpriyan | last post by:
Dear Buddies, I have two Java Prog: My task is to read the Content of the file and write to an XML file. so i started doing it perfectly... What i have problem is when i tried to execute the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.