[python-win32] Microsoft Visual Sourcesafe automation --

Jim Vickroy Jim.Vickroy at noaa.gov
Sun Sep 14 14:40:33 CEST 2008


Jim Vickroy wrote:
> Hello all,
>
> I am attempting to automate Sourcesafe access.
>
> Here is a sample session:
>
> >>> import sys
> >>> sys.version
> '2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]'
> >>> sys.subversion
> ('CPython', 'tags/r252', '60911')
> >>> sys.platform
> 'win32'
> >>> sys.getwindowsversion()
> (5, 1, 2600, 2, 'Service Pack 2')
> >>> import win32com.client
> >>> vcs = win32com.client.Dispatch('SourceSafe')
> >>> config   = r'\\Tsg-admin-01\VSS\srcsafe.ini'
> >>> account  = 'jim.vickroy'
> >>> password = raw_input('password: ')
> >>> vcs.Open(SrcSafeIni=config, Username=account, Password=password)
> Traceback (most recent call last):
>  File "<interactive input>", line 1, in <module>
>  File 
> "C:\Python25\lib\site-packages\win32com\gen_py\783CD4E0-9D54-11CF-B8EE-00608CC9A71Fx0x5x1.py", 
> line 179, in Open
>    , Username, Password)
>  File "C:\Python25\Lib\site-packages\win32com\client\__init__.py", 
> line 448, in _ApplyTypes_
>    dispid, 0, wFlags, retType, argTypes, *args),
> com_error: (-2147352567, 'Exception occurred.', (0, u'SourceSafe', 
> u'Error loading resource string', u'ssusexp.hlp', -11250, 
> -2147210254), None)
> >>>
>
> I'm using pywin32 build 212 and Visual Sourcesafe 6.0c build 9447.
>
> The \\Tsg-admin-01\VSS\ folder contains a SSUSEXP.CHM file but no 
> SSUSEXP.HLP file.
>
> Any suggestions on how to proceed would be much appreciated.
>
> Thanks,
> -- jv
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
I finally got this to work by deleting *vcs* which apparently had 
"somehow" become unusable.  So the following does work:

 >>> import win32com.client
 >>> vcs = win32com.client.Dispatch('SourceSafe')
 >>> config   = r'\\Tsg-admin-01\VSS\srcsafe.ini'
 >>> account  = 'jim.vickroy'
 >>> vcs.Open(SrcSafeIni=config, Username=account)
 >>> vcs.Username
u'Jim.vickroy'
 >>> vcs.CurrentProject
u'$/RTGM/data archival'


More information about the python-win32 mailing list