Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. class FilterModule(object):
  4.   ''' Custom filters are loaded by FilterModule objects '''
  5.  
  6.   def filters(self):
  7.     ''' Filter Module objects return a dict mapping filter names to '''
  8.     return {
  9.       'parse_show_platform': self.parse_show_platform,
  10.     }
  11.  
  12.   def parse_show_platform(self, data, delimeter=':', col=0, offset=0):
  13.     i=0
  14.     result=[]
  15.     for l in data:
  16.         if i < offset:
  17.           i=i+1
  18.           continue
  19.         cols = l.split(delimeter)
  20.         result.append(cols[col].strip())
  21.  
  22.     return(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement