python in html

Posted:
in macOS edited January 2014
i am learning python and i have a website called <a href="http://zerocomedy.com"; target="_blank">zerocomedy.com</a> and i was woundering how to exicute python sqripts in htnl



[ 02-05-2002: Message edited by: Imacgrav ]</p>

Comments

  • Reply 1 of 3
    amorphamorph Posts: 7,112member
    You'll have to be a wee bit more specific.



    If you mean embedding Python in HTML the way you would use JavaScript: You can, but most browsers won't know what to do with it. The only exception I can think of is a browser that's written in Python.



    As far as the web goes, Python is used for back-end stuff: CGI and server side tools.



    In the long term I wouldn't get too attached to JavaScript either, since the W3C seems to be eager to supplant it (with XSLT).
  • Reply 2 of 3
    just to clarify: replacing javascript with XSLT makes no sense and is not the W3C's (or anyone else's) goal.



    ECMAScript (the standardised version of javascript) is the only option for scripting HTML across browsers and will be around for a while.



    XSLT is used to tranform XML files into other formats (usually but not always XML or HTML). It is a functional language designed specifically for this task and consequently suffers if you try to do anything else with it. I can't even imagine how you would go about validating form input or animating DHTML menus with it.



    If you are using python for server-side web scripting check out the Zope project
  • Reply 3 of 3
    amorphamorph Posts: 7,112member
    [quote]Originally posted by bawjaws:

    <strong>just to clarify: replacing javascript with XSLT makes no sense and is not the W3C's (or anyone else's) goal.



    ECMAScript (the standardised version of javascript) is the only option for scripting HTML across browsers and will be around for a while.</strong><hr></blockquote>



    Note that it's ECMA, not W3C; and also that, in practice, it's proven to be a disaster.



    But yes, it'll be around for a while.



    [quote]<strong>XSLT is used to tranform XML files into other formats (usually but not always XML or HTML). It is a functional language designed specifically for this task and consequently suffers if you try to do anything else with it. I can't even imagine how you would go about validating form input or animating DHTML menus with it.</strong><hr></blockquote>



    Read the spec for XForms. Between XForms, XML Schemas, and XSLT the W3C is quite explicitly hoping to be rid of the need for a scripting language, at least for the majority of tasks.



    [ 02-07-2002: Message edited by: Amorph ]</p>
Sign In or Register to comment.