Questions about pyscript

Mark Hammond mhammond at
Thu Feb 7 07:25:15 EST 2002

Ricky wrote:
> I make a try a pyscript. But there is one thin confuse me. When I use print
> statement intent to send something to browse. It doesn't work, while
> document.write can make it. What make me confused is what part is controlled
> under python(such as flow control, functions, package etc) and which part is
> controlled by DHTML(output?).
> Could some one give me an over view option of what pyscript is and the
> object tree map of pyscript is a plus.

ActiveScripting (ie, pyscript) is a technology that allows an 
application to expose an object model, and allow many languages to use 
scripting.  Python works with IE, ASP, WSH and a number of other 
applications - thus there is no "pyscript" documentation that can help you.

IE is just one such application (and the one you seem to be using).  MS 
documents this object model with IE - however, you are only likely to 
find examples for VBScript or jscript, so will need to convert them to 
Python yourself.

Since pyscript doesn't really know about IE in any special way, it 
doesn't know how to redirect 'print' statements to document.write() 
calls.  That has been my exuse anyway - hard-coding for IE wouldn't 
necessarily be too evil :)


More information about the Python-list mailing list