twneale twneale - 3 months ago 11
Python Question

How can I run redemo.py (or equivalent) on a Mac?

In the Python installation on my PC there is a sweet script in C:\python26\tools\scripts called

redemo.py
. It's a simple tk application for testing regular expressions.

I wish I could get it--or something like it--running on my Mac, but I don't know how. The script doesn't appear to be part of the Python installation on my Mac. Ideas?

Answer

You can view the script directly from the python svn repository here and can download it:

curl http://svn.python.org/view/*checkout*/python/trunk/Tools/scripts/redemo.py?content-type=text%2Fplain > redemo.py
/usr/bin/python redemo.py

It seems to work just fine as is on OS X 10.6 with python 2.6.