embedding/parsing script

Bengt Richter bokr at oz.net
Mon Dec 9 12:33:43 EST 2002


On Mon, 9 Dec 2002 17:38:58 +0100, "Gumuz" <gumuz at looze.net> wrote:

>Hi all,
>
>I would like to integrate some kind of scripting capability into my python
>app. See it like this: i have a text document where i want to embed some
You say "into my Python app", but below it looks like the scripting is going
into some kind of text document. And here you say "you" want to embed, but
below it sounds like your "users" are going to be able to embed stuff.
The overall context is a bit unclear to me, but it sounds like you are
reinventing a templating system. There's a wiki that has a section
on the subject at

    http://www.python.org/cgi-bin/moinmoin/WebProgramming

which may give you some ideas.

>simple script between 'tags'. for example i have 'folder-objects' which can
>contain folders and 'page-objects'. a page object has a headline and a
>textcontent property. i imagine it something like this:
>
>-------------------------
>welcome,
>this is my page, this is the content of this page.
>
>these are the pages in folder ###:
><pyScript>
>for X in FolderID:
>  print X.HeadLine
></pyScript>
>
>end of file
>---------------------------
>
>How would one go about doing this. I don't want to give my users the full
>power of python, because then they could stop the app or delete objects etc.
>I want to give them limited scripting capability with a python-like syntax.
>
>all suggestions are welcome as i have absolutely no clue hoe to begin
>something like this.
>
A clue hoe is a good basic tool, and really all you need besides the
seeds and fertilizer you will find at the wiki, but you may find some
interesting other tools also ;-)

Regards,
Bengt Richter



More information about the Python-list mailing list