Python / Active Scripting - Value Assignment - HELP

Mark Hammond mhammond at skippinet.com.au
Wed Mar 13 08:33:52 EST 2002


adeptus wrote:
> OK... 
> 
> Within a script block of a HTML file, I can do the following:
> 
> something = ax.document.bgColor
> ax.document.write("Background color is %s:" %something)

What does:
ax.document.write("Background color is %r:" %something)

show?  (%r == repr(ob))

> 
> However, unlike all the Javascript and VB examples I see, I can't do
> the
> following:
> 
> ax.document.bgColor = "#000000"
> 
> I always get an error about unicode strings being read only.

Post the exact error.

You could try ax.document.bgColor.Value = "#0000" - expecially if the 
object repr() says "<com object>" instead of still being a string.

Mark.




More information about the Python-list mailing list