CherryPy not playing nicely with win32com?
Irmen de Jong
irmen.NOSPAM at xs4all.nl
Thu Nov 10 20:13:24 EST 2005
infidel wrote:
> I've been trying to get my CherryPy server to authenticate users
> against our network. I've managed to cobble together a simple function
> that uses our LDAP server to validate the username and password entered
> by the user:
[...]
> moniker, i, bindCtx = pythoncom.MkParseDisplayName(Pathname)
> com_error: (-2147221020, 'Invalid syntax', None, None)
>
> I don't get it. How can it be ok at the >>> prompt but invalid under
> CherryPy?
Just an idea: because in CherryPy it is running in multithreading mode?
If you are using threads together with COM stuff, you will have to
add pythoncom.CoInitialize() and pythoncom.CoUninitialize() calls
in your code -- for each thread.
--Irmen
More information about the Python-list
mailing list