can regular ol' python do a php include?

Larry Bates larry.bates at websafe.com
Tue Oct 10 18:45:59 CEST 2006


John Salerno wrote:
> Whenever I turn an eye back toward website design, I find myself making
> frequent use of PHP's include function (or SSI's include directive). So
> I'm curious, is there a way to do this with Python using just the
> standard library?
> 
> I know that PSP allows you to embed like PHP, but I don't have access to
> this. Basically I'm working on a server that has Python 2.2 available
> for me to use. I could also use PHP's include, but I like sticking with
> Python. SSI isn't available or I'd probably just use that.
> 
> I get the feeling the answer is no, but maybe there's something I've
> missed that will allow me to do this.
> 
> Thanks.

You might want to review:

http://karrigell.sourceforge.net/

This comes just about as close to PHP-style "includes" (your term) as I
have seen.

-Larry Bates



More information about the Python-list mailing list