RE: [Templates] Using Toolkit w/python

[prev] [thread] [next] [Date index for 2004/08/10]

From: Franco Bagnoli
Subject: RE: [Templates] Using Toolkit w/python
Date: 06:59 on 10 Aug 2004
On Mon, 9 Aug 2004, Thomas, Mark - BLS CTR wrote:

> >  Let me build on my question here: 
> >  How about TCP/IP? Would it be that difficult to set up a 
> >  "Template Toolkit Server" on a socket protocol?
> 
> Why not set up a simple Apache::Template script that reads configuration
> from the URL?
> 
> Then you request an URL like:
> http::/yourserver.com/tt?input=data.txt&template=data.tt
> 
> The server reads 'data.txt' from a predetermined location (or from POST
> content), merges it with the template, and serves the result. The python
> interface could then be urllib, and might look something like this:
> 
> params = urllib.urlencode({'input': 'data.txt', 'template': 'data.tt'})
> f = urllib.urlopen("http://yourserver.com/tt?%s"; % params)
> print f.read()

The idea is interesting, but aren't there many security concerns in 
offering a cgi that executes foreign code? 

Isn't simpler just to embed a perl interpreter into python:

http://search.cpan.org/~gaas/pyperl-1.0/perlmodule.pod

?


        -- 
        Franco Bagnoli (franchino) <bagnoli@xxx.xxxxx.xx> 
virtual location: Dipartimento di Energetica "S. Stecco"
ultra-virtual affiliation: Centro Dinamiche Complesse (CSDC-Firenze)
real location: Dip. Matematica Applicata "G. Sansone", Universita' Firenze,
Via S. Marta, 3 I-50139 Firenze, Italy. Tel. +39 0554796422, fax: +39 055471787


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Using Toolkit w/python
Tim Johnson 20:15 on 07 Aug 2004

Re: [Templates] Using Toolkit w/python
Eric Sammer 20:18 on 07 Aug 2004

RE: [Templates] Using Toolkit w/python
Thomas, Mark - BLS CTR 14:16 on 09 Aug 2004

Re: [Templates] Using Toolkit w/python
Darren Chamberlain 15:24 on 09 Aug 2004

Re: [Templates] Using Toolkit w/python
Tim Johnson 16:37 on 09 Aug 2004

RE: [Templates] Using Toolkit w/python
Thomas, Mark - BLS CTR 17:11 on 09 Aug 2004

RE: [Templates] Using Toolkit w/python
Franco Bagnoli 06:59 on 10 Aug 2004

Re: [Templates] Using Toolkit w/python
Darren Chamberlain 12:31 on 13 Aug 2004

[Templates] Parrot (was Using Toolkit w/python)
Tim Johnson 16:14 on 19 Aug 2004

RE: [Templates] Using Toolkit w/python
Thomas, Mark - BLS CTR 13:17 on 10 Aug 2004

RE: [Templates] Using Toolkit w/python
Franco Bagnoli 16:08 on 10 Aug 2004

Re: [Templates] Using Toolkit w/python
Tim Johnson 17:39 on 10 Aug 2004

RE: [Templates] Using Toolkit w/python
Thomas, Mark - BLS CTR 17:35 on 10 Aug 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52