[python-win32] EnsureDispatch function
Petr Gladkikh
batyi at mail.ru
Wed Apr 23 19:04:04 EDT 2003
Hello.
In my last posting I asked about
win32com.client.gencache.EnsureDispatch(...) function.
Here is what I have find out.
If to use "win32com.client.gencache.EnsureDispatch('SourceSafe', 1)"
(latter parameter is by default). This function generates Python
classes in subdirectory of ...\win32com\gen_py. These generated files
lack "from win32com.client import DispatchBaseClass" instruction.
If to call "win32com.client.gencache.EnsureDispatch('SourceSafe', 0)"
the function generates class files right in ...\win32com\gen_py and
these files have said import instruction. Here is an exerpt:
"""
from win32com.client import DispatchBaseClass
class IVSS(DispatchBaseClass):
"""
Because I need some constants related to SourceSafe interface I need
generated classes to get these constants and call in form
"win32com.client.gencache.EnsureDispatch('SourceSafe', 0)"
works fine for me.
--
Best regards,
Petr mailto:batyi at mail.ru
More information about the Python-win32
mailing list