[Tutor] how to add python code to a webpage
alan.gauld at freenet.co.uk
Mon Jul 18 13:09:40 CEST 2005
> i want to create a simple page which has a form
> and takes in persons date of birth and give out exact age.
CGI would be the normal route but...
> how do i add python codeto an html page.
You can use an ASP style approach if you install winall and have WSH
on Windows, but it will only work in IE, not Mozilla based browsers.
Another way of doing it is to use Zope, but thats way overkill for
> i don't have any dreamweaver or frontpage.
Thats OK, you can write html in Notepad if necessary.
Take a look at the 'Getting Started' page in my tutor,
You would do the same but use
# your code here
instead of the other languages.
> some freinds advised me to create this isnce i am learning
> programming python..
Writing web pages is only one kind of programming (And not really a
kind IMHO!). Python can do many other types of programs including GUI
applications too. But either CGI or Client Side Scripting (as the
is called) can be done in Python.
Author of the Learn to Program web tutor
More information about the Tutor