Re: [python-win32] translating VB into Python...

2007-05-17 Thread Michael March
I just wanted to follow up and say I completed my app today. Everything worked wonderfully. Thanks to everyone. If anyone needs assistance automating Quality Center with Python, let me know. On 5/16/07, Michael March <[EMAIL PROTECTED]> wrote: > Hurray > > >>> mybug=bfact.Item(24) > > >>>

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Michael March
Hurray >>> mybug=bfact.Item(24) >>> mybug.Field("BG_DESCRIPTION") u'Test Set: Mercury Tours UI\nTest: [1]Welcome Page\nRun: Run_9-11_11-43-36\nSte p: Verify Tag Properties\n\nDescription:\n1. Click the "Find Next" button.\n2. V erify properties for the tag.\n\nExpected result:\n\n\nActua

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Graham Bloice
Tim Golden wrote: > Michael March wrote: >> [resend - I think the mailing list ate my last post..] > > I saw it! But no matter, the web link's useful. I imagine > Mark's hitting the sack about now (assuming he's in > Australia). It's 3pm here in the UK so I'll try to see > if I can spot what's hap

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Mark Hammond
> > printing repr(mybug) before the above line would be > interesting tho, just to > > make sure it is a makepy object - if it wasn't I could see > it happening in > > edge cases (ie, the code around ERRORS_BAD_CONTEXT in > > win32com.client.dynamic) > > >>> repr(mybug) > ' 0x18853976>' Yeah -

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Tim Golden
Michael March wrote: > [resend - I think the mailing list ate my last post..] I saw it! But no matter, the web link's useful. I imagine Mark's hitting the sack about now (assuming he's in Australia). It's 3pm here in the UK so I'll try to see if I can spot what's happening, but from a glance at th

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Michael March
[resend - I think the mailing list ate my last post..] See comments below... On 5/16/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > I'm hoping that Mark Hammond will catch sight > > of this thread and chip in. I'm guessing that > > you're seeing some odd interaction between > > the generated cla

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Michael March
See below.. On 5/16/07, Tim Golden <[EMAIL PROTECTED]> wrote: > I'm hoping that Mark Hammond will catch sight > of this thread and chip in. I'm guessing that > you're seeing some odd interaction between > the generated class/module and the COM object > properties. There's a sort of funniness where

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Mark Hammond
> I'm hoping that Mark Hammond will catch sight > of this thread and chip in. I'm guessing that > you're seeing some odd interaction between > the generated class/module and the COM object > properties. There's a sort of funniness where > properties can be methods... or not. I'm stumped too. > >

Re: [python-win32] translating VB into Python...

2007-05-16 Thread Tim Golden
I'm hoping that Mark Hammond will catch sight of this thread and chip in. I'm guessing that you're seeing some odd interaction between the generated class/module and the COM object properties. There's a sort of funniness where properties can be methods... or not. Have you generated a proxy module

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Michael March
>>> mybug.Field("BG_DESCRIPTION")= "123" SyntaxError: can't assign to function call On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > Michael March wrote: > > Here is another example in context: > > > mybug.Field("BG_DESCRIPTION") > > > u'Test Set: Mercury Tours UI\nTest: [1]Welcome P

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Tim Roberts
Michael March wrote: > Here is another example in context: > mybug.Field("BG_DESCRIPTION") > u'Test Set: Mercury Tours UI\nTest: [1]Welcome Page\nRun: > Run_9-11_11-43-36\nSte > p: Forms\n\nDescription:\nCheck the forms on the page:\n- Input fields\n > - Lists\n- Radi

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Michael March
Here is another example in context: >>> import win32com.client >>> td = win32com.client.Dispatch("TDApiOle80.TDConnection.1") >>> td.InitConnectionEx( "http://myserver.com:8080/qcbin/"; ) >>> td.ConnectProjectEx("TM_PLAY_AREA", "TM_PlayArea", "user", "passwd") >>> bfact = td.BugFactory >>> mybug=b

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Michael March
Ok.. here is the VB example .. (this is for / provided by HP's Quality Center help file..) Sub LinkDefects() 'This example creates two defects and links them Dim BugF As BugFactory Dim Bug1 As Bug ' tdc is a TDConnection. The user is authenticated and ' connected to the project befor

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Tim Golden
Michael March wrote: > When you do: > > object.Field("UserDefined_01") > > ... the output is a unicode object.. So putting: > >object.Field("UserDefined_01").Value > > .. barfs.. > > I'm obviously missing something here.. Not seeing the exact code you're using, so I could be wrong, b

Re: [python-win32] translating VB into Python...

2007-05-14 Thread Michael March
> Michael March wrote: > > I have some sample code with this: > > > >object.Field("UserDefined_01") = "Open" > > > > Python barfs on that.. what would be the equivalent of that in Python? > > > > Usually: > object.Field("UserDefined_01").Value = "Open" > > VB has the concept of a "default p

Re: [python-win32] translating VB into Python...

2007-05-11 Thread Tim Roberts
Michael March wrote: > Cool.. > > The docs have this: > > Public Property Field( _ > ByVal FieldName As String _ > ) As Variant > > Can we infer the default property from this? No, all this tells you is that you feed a string as a parameter. You have to know more about the Variant that will be

Re: [python-win32] translating VB into Python...

2007-05-10 Thread Michael March
Cool.. The docs have this: Public Property Field( _ ByVal FieldName As String _ ) As Variant Can we infer the default property from this? On 5/10/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > Michael March wrote: > > I have some sample code with this: > > > >object.Field("UserDefined_01"

Re: [python-win32] translating VB into Python...

2007-05-10 Thread Tim Roberts
Michael March wrote: > I have some sample code with this: > >object.Field("UserDefined_01") = "Open" > > Python barfs on that.. what would be the equivalent of that in Python? > Usually: object.Field("UserDefined_01").Value = "Open" VB has the concept of a "default property" for a coll

[python-win32] translating VB into Python...

2007-05-10 Thread Michael March
I have some sample code with this: object.Field("UserDefined_01") = "Open" Python barfs on that.. what would be the equivalent of that in Python? thanks! -- Michael F. March - mmarch at gmail dot com ___ Python-win32 mailing list Python-win