About the software
Pyreb is a
wxPython GUI to the
re python module; it will speed up the
development of
Python regular expression (similar to PCRE).
The GUI is simple and features 3 parts:
- A text box where the text to be analyzed is displayed
- A text box where the regular expression to be applied is displayed
- A tree control where the results are displayed
When one of the two textboxes change the regex is compiled and applied. Errors
in the regex are shown in a statusbar.
Pyreb ships with a simple
XMLRPC server that can be used to control pyreb
from an external application. It must be started using the
Tools/Start XMLRPC Server
menu item. The XMLRPC server understands 4 methods:
- Pyreb.setText(Txt)
- Pyreb.getText()
- Pyreb.setRegex(Txt)
- Pyreb.getRegex()
The first two get/set the text in the uppermost section; the last two get/set
the regex in the medium section. Once the text/regex is set the match is
recalculated and shown, as it would happen in interactive usage.
The set methods return the text previously stored in the control.
A sample session:
- >>> import xmlrpclib
- >>> a = xmlrpclib.ServerProxy("http://localhost:17787")
- >>> a.system.listMethods()
['Pyreb.getRegex', 'Pyreb.getText', 'Pyreb.setRegex', 'Pyreb.setText', 'system.listMethods', 'system.methodHelp', 'system.methodSignature']
- >>> a.Pyreb.setText("abc")
''
- >>> a.Pyreb.getText()
'abc'
- >>> a.Pyreb.setRegex('a?(bc){1,}')
''
These commands set the text 'abc' in the "Text to analyze" edit box, the regex
in the "Regex to apply" edit box and recomputes the match, shown in the
lower "Results" tree.
Pyreb is somewhat similar to
Activestate RX Toolkit (part of Komodo IDE), but is a completely different project.
-->return to top
Screenshots
-->return to top
Links
-->return to top
Requirements (between braces, in bold, are tested versions)
- GNU/LINUX (Mandrake distro, Kernel 2.4) or Microsoft Windows (XP SP2) but should be OS-independent
- Python (Official 2.4.1, ActivePython 2.4.2)
- wxWidgets >= 2.6.0 (2.6.1)
- wxPython >= 2.6.0 (2.6.1)
- setuptools, if you want to install Pyreb using its setup.py
-->return to top
Download and Project Page
From the
Savannah download page you
can access both releases and GPG signatures. Or you can access the release directly, following
the links below.
Pyreb project page is located at
http://savannah.nongnu.org/projects/pyreb/
Pyreb is also available from the Python Cheese Shop:
http://cheeseshop.python.org/pypi/Pyreb/
-->return to top
Current version is 0.1.6
-->return to top
Status
Although in early stage of development the interactive part is mostly usable.
Bugs will creep up, even if I claim I develop high quality software, and everyone
is encouraged to report or (better :-) fix them.
-->return to top
Last revised: $Date: 2006/12/11 09:27:03 $