How can I load python script into Html ??

PatPoul patpoul23 at hotmail.com
Tue Dec 13 17:02:40 EST 2005


I want to do the same thing as
<script language="javascript" src="xxx.js"></script>

but with a python script  :
<script language="Python" src="xxx.py"></script>

==================================
if xxx.py :
def mytest():
	alert("test")
	window.document.write('test')
==================================
and test.html :
<HTML>
<SCRIPT Language="Python" src="xxx.py"></SCRIPT>

<SCRIPT Language="Python">
mytest()
</SCRIPT>
</HTML>
==================================

I always got this error :
NameError : name 'mytest' is not defined

Thx ... 
Patrick Poulin




More information about the Python-list mailing list