Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SomeClassName:
- def __init__(self, filename):
- self.connection = sqlite3.connect(filename)
- def some_method(self):
- with self.connection:
- cursor = self.connection.cursor()
- cursor.exeucte('SELECT some, column FROM some_table')
- for row in cursor:
- some_data_processing(row)
- return some_result
- some_variable = SomeClassName('....')
- result = some_variable.some_method()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement