Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24

    XHTML and Python


    Do you know of any tutorials that teach you about making an XHTML page and importing Python scripts?

    Example: Getting date and time.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Sorry i'm lost, can you examplain what you mean ..

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    This is so hard to explain.

    Say you are making an XHTML/XML page. (Saved as .htm) In the script of the page, you import Python scripts to do certain things like get the date and time.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    13
    Check out the following paper. I think this may lead you in the right direction

    http://www.python.org/pycon/papers/framework/web.html
    Debian - because life's too short for worrying.
    Best. (Python.) IRC bot. ever.
  8. #5
  9. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    You mean you want to call a CGI program from within a html page? If so i've seen perl counters called in this way but i don't know how exactly..

    Mark
    programming language development: www.netytan.com Hula

  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    I think I want to call a CGI program. I just know someone made a page in XHTML/XML and they imported Python scripts.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    13
    *cough* read the above paper
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I've read the paper strike (read it last night ), was very interstig. But it didn't say anything about calling a python program from inside plain html which is what were talking about here?

    Mark.
    programming language development: www.netytan.com Hula

  16. #9
  17. No Profile Picture
    Hi, I'm Calvin
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    LosAngeles, SanDiego, Houston
    Posts
    50
    Rep Power
    11
    hmmm...

    do you mean something like invoking python code inside of html, like jsp style?

    you might give spyce or psp a try or something... and yeah, read the linked paper
  18. #10
  19. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I'm definatly a Spyce kinda guy when it comes to embedding Python in html. PSP just doesn't sit well with me for some reason. Maybe it's the whole Java thing

    Anyway there does seems to be some comfusion about what exactly we're talking about here .. maybe you could give us some more info?

    Edit: I would read the article Strike pointed to if you havn't already, if only out of interest.

    Mark.
    Last edited by netytan; October 3rd, 2003 at 10:54 AM.
    programming language development: www.netytan.com Hula

  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    I read the paper. It was a very good read but didn't explain what I wanted. I think you guys are on the right track of what I was wanting to do.

    So should I get Spyce?

    * What is Rpy?
  22. #12
  23. No Profile Picture
    Hi, I'm Calvin
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    LosAngeles, SanDiego, Houston
    Posts
    50
    Rep Power
    11
    RPy: it's an interface between python and "R-Programming Language"... which, i think, is a statistical programming language. i don't know much more than that, i just googled it.

    as far as spyce goes... Mark seems to really like it. i think it's pretty powerful (seems like it) but i don't know what it's like to actually use it (speed, flexibility, etc).

    you can find it at http://spyce.sourceforge.net/
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    Is it possible to embed Python into XHTML without having to download anything?
  26. #14
  27. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Well i've chatted to the guy who made Spyce a few times which kinda helps and i'd It's fast enough, i wouldn't say that it's speedy.. well unless of course you run it with mod_python or fastcgi then

    So if you're looking for speed then Spyce probably isn't for you, but if your looking for power, some sweet features and truly Pythonic way to work on the web then i think you'll be surprised.

    If your on windows then you can probably get ASP to handle embedding Python for you, other than that you could write you're own?

    Mark.
    programming language development: www.netytan.com Hula

  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    Is there any program that has speed AND power? Both are very important to me.

    If you have a program like Spyce, do you have to use a certain extension? Such as ".spy" Is there a program where you can just save it as ".htm" or ".html"?

    You can't have ASP on Windows XP: Home Edition. I'm saving up to build a computer. I'm going to have Debian as my operating system. (Best OS ever! )
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo