embedding/parsing script

Gumuz gumuz at looze.net
Mon Dec 9 11:38:58 EST 2002


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
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.


regards,

Guyon





More information about the Python-list mailing list