Python Regular Expression Builder 0.1.6

Python Regular Expression Builder is a wxPython GUI to the re python module.

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
GPL (GNU General Public License) 
USER RATING:
2.6/5 17
DEVELOPED BY:
Giuseppe Corbelli
HOMEPAGE:
pyreb.nongnu.org
CATEGORY:
ROOT \ Programming \ Widgets
Python Regular Expression Builder 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.

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")
'setText'
>>> a.Pyreb.getText()
'abc'
>>> a.Pyreb.setRegex('a?(bc){1,}')
'setRegex'

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.

Requirements:

GNU/LINUX (Mandrake distro, Kernel 2.4)
Python (Official 2.4.1, ActivePython 2.4.2)
wxWidgets >= 2.6.0 (2.6.1)
wxPython >= 2.6.0 (2.6.1)

What's New in This Release:

The XMLRPC server can now be started from the command line.

Last updated on December 11th, 2006

#regular expression #expression builder #Python module #Python #regular #expression #builder

Add your review!

SUBMIT