win32com parameters

Steve Holden sholden at holdenweb.com
Mon Oct 29 16:10:44 CET 2001


"Alberto Rodriguez" <x at x.com> wrote in message
news:9rjqch$riu$1 at diana.bcn.ttd.net...
> Hi:
>
> >>> print ox.primero
> answer with: number1 (the correct answer)
>
> but when i send a parameter
>
> >>> print ox.primero('1')
>
> I have this error:
>
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
> TypeError: object of type 'unicode' is not callable
> >>>

This would seem to establish that primero is a string attribute, and is not
callable. You can verify this with

    print type(ox.primero)

So, what makes you think you can call it as a method? What code can you run
in Visual Basic for Applications (?) that is equivalent to the

    oRec = ox.primero('asfd')

that fails in Python?

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list