Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

regex

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?

like image 633
twneale Avatar asked Oct 14 '25 16:10

twneale


1 Answers

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.

like image 160
Ned Deily Avatar answered Oct 17 '25 04:10

Ned Deily