[python-win32] suggested change to pywintypes.py for non-admininstall
Ryan Blazecka
rblazecka at radical.ca
Thu Sep 11 01:55:42 CEST 2008
oops, sorry, I suppose I shouldn't be deleting so much of the message
history. ;)
the specific circumstance that I've come across is with a non-admin
install of the win32 module. if I run python from the python directory
(so that the current directory is the directory where pywintypes25.dll
lives), then everything works fine.
if I run python from some other directory (ie my application directory),
imports of the win32 modules (win32gui, win32ui, etc) fail unless I
first import pywintypes.
Mark Hammond wrote:
> I'm afraid I've missed most of the context here:
>
>> I have come across this issue, and am equally unsatisfied with the
>> solutions I've come up with so far. all of them require the user to
>> know
>> too much about what's going on, and does not make the import "just
>> work".
>>
>> what if we added a python wrapper module (.py) around the native (.pyd)
>> modules? it would contain something like the following:
>>
>> import pywintypes
>> import pythoncom
>> from _win32ui import *
>
> In what cases is it necessary to explicitly import pywintypes before
> win32ui?
>
> Mark
More information about the python-win32
mailing list