Advertisement
Guest User

Untitled

a guest
Dec 31st, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. class Indexer:
  2.  
  3.  def __init__(self):
  4.    
  5.   self.conn = psycopg2.connect("dbname='postgres' user='postgres' password='120789' host='localhost'")
  6.  
  7.   self.cur = self.conn.cursor()
  8.   self.cur.execute("set search_path to 'rambler_search'")
  9.  
  10.   self.grab = Grab()
  11.  
  12.  def __del__(self):
  13.   self.conn.close()
  14.  
  15.  def dbcommit(self):
  16.   self.conn.commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement