An idea - request for comments

Ian Clarke I.Clarke at
Thu Aug 5 10:39:20 CEST 1999

> I'm not going to say either of those! I have done it, although I'm not
> terribly happy with the results so far and it's on the back burner for
> the moment .... I need to figure out if it's still useful in a Zope
> world - which means I have to learn and understand Zope!

Yes, I am in the same situation.  It sounds from a user interface point
of view, that Zope can do Python embedding easily, so then the question
becomes whether this idea would be more efficient than Zope (in terms of
page generation, AND simplicity of deployment).

> I embed the python fragments in HTML comment blocks for the sake of
> my HTML editor tools which would otherwise feel very sad ...

Well, I wanted to allow the editing of Python code blocks from within
the HTML editor (that would prevent any kind of autoindentation).
> I've also set it up (at least in one version) so that the python can
> generate http headers at the start as well .... or they can be embedded in
> the templates.


> Yup! All there (minus "appropriately neat": more "rather nasty" for now I'm
> afraid)

I thought that the CGI variables could be directly translated into local
variables and accessed like that, or possibly just turned into a
dictionary called 'cgi'.

> Also I haven't yet dealt with putting the python into rexec for execution-
> but this is only needed if a web master wants to give their clients access
> to these facilities as opposed to doing things themselves.

I think this would be a very nice feature as it would mean that ISPs
could grant CGI access to their users (provided their users are willing
to learn Python - and what language could be easier to learn?) without
raising any security concerns.

> * indenting of the python bits versus the HTML bits doesn't mesh
>    very well

Yes.  We look into writing indentation modes for Emacs, and combining
HTML and Python modes in some way.
> * the base server that I use is a threaded version of SimpleHTTP and I seem
>    to have occasional problems with the thing hanging ... don't know why
>    and haven't time to look into it just now

Peculiar, if the problem could be replicated then we could get whoever
wrote SimpleHTTP on the case.

> * I haven't figured how many security holes this might open ...

Hopefully none if we execute the Python scripts in a "padded cell".

> I'll upload the thing to my starship account when I get home tonight just
> in case anyone is interested!! I'll get back tomorrow with a URL.

I look forward to taking a look.  Are you willing to release the code
under the GPL?


Remove the "NOSPAM." from my email address before replying.

More information about the Python-list mailing list