Pthon scripting question.

Mark Hammond MarkH at ActiveState.com
Tue May 15 21:24:03 EDT 2001


José Rui Faustino de Sousa wrote:

> <script language="python" type="text/python" >
>     print 'Hello World!'
> </script>
> 
> I have also tryed to do it like this:
> 
> <script language="python" type="text/python" src="foo.py" />
> 
> and although the script runs (and writes to a file) it does not seam to
> be able to output to the browser canvas.


'print' is not magically linked up with anything.  You should find 
"document.Write()" and "document.WriteLn()" work and do what you want.

> I have been looking around and was not able to find anything that could
> use python directly...


Check out the I examples in the win32com package.  The win32com 
readme.html has pointers.

Mark.




More information about the Python-list mailing list