Or Should I change my question to 'how to implement regular expression tester like these': regular expression editor python
Maybe this is more like a programming question. My application will read in an article and expose a variable, say TEXT, to represent this article. Allow users to write Python re compatible script to manipulate the TEXT (the article), particularly to replace something.
For example, users could write the following commands, and my app should read it in and execute it:
p = re.compile( 'red')
p.sub( 'color', TEXT)
And I will release my app with something like py2exe, so I think How can I make one python file run another? doesn't work.
I know how to write regular expression, but now "using a Python script to run a Python script" really confuses me.