¡@

Home 

python Programming Glossary: self.conn

PostgreSQL - how to run VACUUM from code outside transaction block?

http://stackoverflow.com/questions/1017463/postgresql-how-to-run-vacuum-from-code-outside-transaction-block

db object def __init__ dbname host port user password self.conn psycopg2.connect dbname s host s port s user s password s.. s password s dbname host port user password self.cursor self.conn.cursor def _doQuery self query self.cursor.execute query self.conn.commit.. def _doQuery self query self.cursor.execute query self.conn.commit def vacuum self query VACUUM FULL self._doQuery query..

Lost connection to MySQL server during query

http://stackoverflow.com/questions/1884859/lost-connection-to-mysql-server-during-query

here # import MySQLdb class DB conn None def connect self self.conn MySQLdb.connect 'hostname' 'user' ' ' 'some_table' cursorclass.. MySQLdb.cursors.SSCursor def query self sql try cursor self.conn.cursor cursor.execute sql except AttributeError MySQLdb.OperationalError.. sql except AttributeError MySQLdb.OperationalError self.connect cursor self.conn.cursor cursor.execute sql return cursor..

How to delete a row from a listbox in TKinter and SQLite3

http://stackoverflow.com/questions/19738499/how-to-delete-a-row-from-a-listbox-in-tkinter-and-sqlite3

Listbox master width 50 self.content.pack # open database self.conn sqlite3.connect 'phonebook1.db' c self.conn.cursor # create.. open database self.conn sqlite3.connect 'phonebook1.db' c self.conn.cursor # create table c.execute '''CREATE TABLE IF NOT EXISTS.. name TEXT primary key age TEXT phone TEXT fblink TEXT ''' self.conn.commit # read people people c.execute SELECT FROM people self.conn.commit..

How to enable MySQL client auto re-connect with MySQLdb?

http://stackoverflow.com/questions/207981/how-to-enable-mysql-client-auto-re-connect-with-mysqldb

import MySQLdb class DB conn None def connect self self.conn MySQLdb.connect def query self sql try cursor self.conn.cursor.. self.conn MySQLdb.connect def query self sql try cursor self.conn.cursor cursor.execute sql except AttributeError MySQLdb.OperationalError.. sql except AttributeError MySQLdb.OperationalError self.connect cursor self.conn.cursor cursor.execute sql return cursor..

Error using httlib's HTTPSConnection with PKCS#12 certificate

http://stackoverflow.com/questions/2630011/error-using-httlibs-httpsconnection-with-pkcs12-certificate

usrname passwd self.cert_file cert_file self.host host self.conn httplib.HTTPSConnection host self.host port self.port key_file.. port self.port key_file cert_file cert_file cert_file self.conn.putrequest 'GET' 'pathnet DanaInfo 200.222.1.1 ' self.conn.endheaders.. self.conn.putrequest 'GET' 'pathnet DanaInfo 200.222.1.1 ' self.conn.endheaders retCreateCon self.conn.getresponse if is_verbose..

Scrapy pipeline spider_opened and spider_closed not being called

http://stackoverflow.com/questions/4113275/scrapy-pipeline-spider-opened-and-spider-closed-not-being-called

object def __init__ self log.msg Initializing Pipeline self.conn None self.cur None def spider_opened self spider log.msg Pipeline.spider_opened..

No connection could be made because the target machine actively refused it

http://stackoverflow.com/questions/4532335/no-connection-could-be-made-because-the-target-machine-actively-refused-it

it's probably a simple mistake somewhere. def connect self self.conn socket.socket socket.AF_INET socket.SOCK_STREAM self.conn.connect.. self.conn socket.socket socket.AF_INET socket.SOCK_STREAM self.conn.connect self.host self.port That is the code causing the error...

create a global function in python

http://stackoverflow.com/questions/5761408/create-a-global-function-in-python

#removing this was the fix class zoneFTP def __init__ self self.conn FTP self.dir '. ' notify 'The dir is ' self.dir def main notify..

Multiple simultaneous network connections - Telnet server, Python

http://stackoverflow.com/questions/776120/multiple-simultaneous-network-connections-telnet-server-python

self.host self.port def send self msg if type msg str self.conn.send msg end elif type msg list or tuple self.conn.send ' n'.join.. msg str self.conn.send msg end elif type msg list or tuple self.conn.send ' n'.join msg end def recv self self.conn.recv 4096 .strip.. or tuple self.conn.send ' n'.join msg end def recv self self.conn.recv 4096 .strip def exit self self.send 'Disconnecting you...'..

Creating a logging handler to connect to Oracle?

http://stackoverflow.com/questions/935930/creating-a-logging-handler-to-connect-to-oracle

mx.ODBC.Windows self.dsn dsn self.uid uid self.pwd pwd self.conn mx.ODBC.Windows.connect self.dsn self.uid self.pwd self.SQL.. d msecs d ' exc_text s' ' thread s' self.cursor self.conn.cursor def formatDBTime self record record.dbtime time.strftime.. sql self.SQL record.__dict__ self.cursor.execute sql self.conn.commit except import traceback ei sys.exc_info traceback.print_exception..