[egenix-users] mx.TextTools - any way to return a value from CallTag (or add a new command/flag)?

Frank McIngvale fmcingvale at gmail.com
Tue Jul 24 20:45:27 CEST 2007


On 7/24/07, M.-A. Lemburg <mal at egenix.com> wrote:
>
> On 2007-07-25 00:39, Frank McIngvale wrote:
> > Hi, I'm trying to find a way to call a conversion function with the text
> > matched through a TagTable entry. For example, lets say I'm matching on
> > [0-9]+ and want to convert the result to an integer. I'd like to be able
> to
> > do something like:
> >
> > TagTable:
> >   ...
> >   (int, AllIn+CallWithMatch, number)
> >
> > Where 'CallWithMatch' would be a flag that says to call the tagobj and
> add
> > the result to the to the taglist. I've looked all through the manual but
> > none of the commands+flags seem to do that. Am I overlooking it
> somewhere?
>
> You can use the flag CallTag and then use a helper function as
> tagobj:



Ah! Yes, that works perfectly. I overlooked the significance of the
'taglist' parameter there :-)

thanks!
frank


--
> Marc-Andre Lemburg
> eGenix.com
>
> Professional Python Services directly from the Source  (#1, Jul 25 2007)
> >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
> >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
> >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
> ________________________________________________________________________
>
> :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
>
>
>    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
>     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>            Registered at Amtsgericht Duesseldorf: HRB 46611
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20070724/4d6596c6/attachment.htm


More information about the egenix-users mailing list