[Baypiggies] Python web question

Max Slimmer max at theslimmers.net
Thu May 5 02:28:45 CEST 2011


you probably should first look at web frameworks, go to
http://wiki.python.org/moin/WebFrameworks or do a google search.  This
url mentions Pylons which is now Pyramid and pretty cool, I have
worked with web2py and it is an easy start, does a lot for you, some
magically, but still cool.

Most of the frameworks let you choose the templeting language, some
which are very pythonic some lean more toward html side. All those
mentioned in prior responses are Fine and will do what you are asking
for.  But you have to have a way to deliver the resultant html, and
writing your own cgi though instructive isn't the fastest way to get
to serving web pages.


max



On Wed, May 4, 2011 at 4:11 PM, David Berthelot
<david.berthelot at gmail.com> wrote:
> Hello,
>
> I have a simple question:
> is there an equivalent to <?php  ... ?> for mixing Python and HTML ?
>
> For example something like this:
>
> <body>
>  <?python
>      if user == 1:?>
>  <h1>Welcome admin</h1>
>  <?python
>      else:?>
>  <h1>Welcome</h1>
> </body>
>
> Basically something similar in behavior to PHP but for Python ;)
>
> Thanks,
>
> David
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>


More information about the Baypiggies mailing list