Advertisement
Joze

Untitled

Jan 16th, 2012
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: iso-8859-15 -*-
  3. from database import *
  4.  
  5. def filterZ(x):
  6.     return x['origin']=='z'
  7.  
  8. db = DATABASE()
  9.  
  10. result = db.executeProcedure('get_all_test', None)
  11. if result:
  12.     rows = db.getLastExecutionResult()
  13.     print "Test de filter sobre listas \n %s\n" % filter(filterZ,rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement