Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. class SomeClassName:
  2. def __init__(self, filename):
  3. self.connection = sqlite3.connect(filename)
  4.  
  5. def some_method(self):
  6. with self.connection:
  7. cursor = self.connection.cursor()
  8. cursor.exeucte('SELECT some, column FROM some_table')
  9. for row in cursor:
  10. some_data_processing(row)
  11.  
  12. return some_result
  13.  
  14. some_variable = SomeClassName('....')
  15. result = some_variable.some_method()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement