Providing Python scripting to a Python application

Satheesh Babu vattekkat.babu at verizon.net
Fri Dec 27 06:46:47 EST 2002


Hello,

I'm writing a Python app at the moment. I've several Python functions in a
library that I look into by introspection to let users create a "script" -
nothing more than a series of function calls with GUI to edit parameter
values and order of calling.

At the moment, I store this "script" in a Python class and then execute it
by eval()-uating functions. What I would love to do is to add normal
Python constructs like if-else, for, while etc.

Anyone have any pointers to things on the web that I can look into for
making a applications in which macros can be written using Python?

Background: This is primarily a Windows app, though it should be portable
'coz it uses wxPython. At the moment, target audience is people who find
using MS-Word difficult - hence the GUI circus to add functions and edit
parameters. Atleast for Windows, I'll need to package it using py2exe so
that it installs like a "normal  Windows app" :-)

What it does is to expose a library to users through GUI so that they can
create scripts that run on batches of files, without help from programmers
all the time.

Thanks in advance

S Babu
http://vsbabu.org/



More information about the Python-list mailing list