Back to index

plone3  3.1.7
Classes | Functions
wicked.fieldevent.txtfilter Namespace Reference

Classes

class  TxtFilter

Functions

def txtfilter_output
def ijoin

Function Documentation

def wicked.fieldevent.txtfilter.ijoin (   a,
  b 
)
yield a0,b0,a1,b1.. if len(a) = len(b)+1

Definition at line 95 of file txtfilter.py.

00095 
00096 def ijoin(a,b):
00097     """yield a0,b0,a1,b1.. if len(a) = len(b)+1"""
00098     yield(a[0])
00099     for i in range(1,len(a)):
00100         yield(b[i-1])
00101         yield(a[i])

Here is the caller graph for this function:

def wicked.fieldevent.txtfilter.txtfilter_output (   field,
  instance,
  event 
)
a run once subscriber to process text in a pipeline

Definition at line 9 of file txtfilter.py.

00009 
00010 def txtfilter_output(field, instance, event):
00011     """a run once subscriber to process text in a pipeline"""
00012     
00013     if getattr(event, '_txtfiltered_', False):
00014         return
00015     
00016     filter_names = queryMultiAdapter((field, instance, event), ITxtFilterList)
00017     if not filter_names:
00018         return
00019 
00020     txts = subscribers((field, instance, event), ITxtFilter)
00021     txtmap = dict([(f.name, f) for f in txts])
00022 
00023     for name in filter_names:
00024         try:
00025             txtfilter = txtmap.get(name, None)
00026             if callable(txtfilter):
00027                 txtfilter()
00028         except EndFiltrationException, e:
00029             break
00030         
00031     event._txtfiltered_=True
00032 

Here is the call graph for this function: