[Tutor] Confused about embedding python in Html
alan.gauld at freenet.co.uk
Sun Aug 21 16:01:24 CEST 2005
> I want to use embedded python in an html page.
I assume you mean you want to embed python code in amongst
your HTML and have it executed at the server in the same way
There is a system available called PSP - Python Server Pages
which allows this but be aware that because of Python's
indentation rules its more complex that it might seem.
Its usually easier to embed HTML into your Python code as a CGI script
> However, I dont want to force the user to have python installed for
> the page to work.
Thats OK, most web frameworks work by having the server execute the
any chance of browser compatibility.
> Is there any way to make the embedded python code be executed by the
> I'm hoping ti use python as an alternative to vbscript and jaava
VBScript and Java are often used client side - especially where you
sure the browwer is IE, however with ASP and JSP both can be used
side too. It depends on how you are using them whether you can replace
As a general guide I'd recommend using CGI for server side python,
More information about the Tutor