[python-win32] python and COM - in particular Visual SourceSafe

amapy at snafu.de amapy at snafu.de
Fri May 9 08:28:51 EDT 2003


> Hello Andreas,

Hi Tony,

> 
> I use VB at my work, and I'mjust starting to use Python.

That's a good idea.

> 
> I haven't tried accessing VSS yet- but now that you've shown me how, I
> want t try it.
> What does the makepy- utility do-that you mention below ?
> 
> thanks
> tony

I'm not a theoretical specialist for the COM-technology, but
makepy genearates the file 78CD4E0-9D54-11CF-B8EE-00608CC9A71Fx0x5x1.py
under Lib\site-packages\win32com\gen_py where all constants,
methods and properties of the SSAPI.DLL (the SourceSafe type library)
are listed. In the pythonwin-IDE (Many thanks to Mark Hammond) autocomplete
does work fine after generating this file like the MS-IDE.
The expected method I need will be listed in this way:

# Result is of type IVSSItem
# The method GetVersion is actually a property, but must be used as a method to 
correctly pass the arguments
def GetVersion(self, Version=defaultNamedOptArg):
    ret = self._oleobj_.InvokeTypes(0x18, LCID, 2, (9, 0), ((12,17),),Version)
    if ret is not None: ret = win32com.client.Dispatch
(ret, 'GetVersion', '{2A0DE0E7-2E9F-11D0-9236-00AA00A1EB95}', UnicodeToString=0)
    return ret

(The mail-program will give the sequence maybe a wrong format)

Considere that oVSSItem is a object of type IVSSItem. I can get any
version of this item like this:

ThisVersion = oVSSItem.GetVersion(<SomeLabel>)

The problem I have is, that the method GetVersion will not appear in the
object catalog of VB.

Why I can see .GetVersion in the makepy-file ?

regards

Andi






More information about the Python-win32 mailing list