SyntaxError: can't assign to function call win32com.client

Stefan Migowsky smigowsky at dspace.de
Thu Dec 2 05:26:06 EST 1999


Hi,

properties with parameters are only supported in Python if
you use the generated wrapper (makepy.py) dynamic generated
code will fail. With the wrapper your call would look like :
 
objUser.SetDynamicProperty("BILLING_ADDRESS2", "3 The Street")

you could check if you have wrapper support with a one liner:
>>> objUser
<COMObject unknown>  # No Wrapper support
>>> objUser
<win32com.gen_py.SomeNameObjectLibrary.SomeClassDefinition>  # Wrapper
support


Stefan


>-----Original Message-----
>From: tiddlerdeja at my-deja.com [mailto:tiddlerdeja at my-deja.com]
>Sent: Wednesday, December 01, 1999 7:35 PM
>To: python-list at python.org
>Subject: SyntaxError: can't assign to function call win32com.client
>
>
>I'm trying to mirror this VB code (which works) with python code:
>
>objUser.DynamicProperty("BILLING_ADDRESS2") = "3 The Street"
>
>This code works in VB but in python I get the error:
>
>SyntaxError: can't assign to function call
>
>Can you tell me what syntax I need to use for python?
>
>Any help greatly appreciated. I don't want to have to use VB!
>
>Kieran Breen
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
>
>-- 
>http://www.python.org/mailman/listinfo/python-list
>




More information about the Python-list mailing list