Database module & multithreading

jupiter anil.jupiter9 at gmail.com
Sat Mar 10 10:59:29 EST 2007


On Mar 10, 8:42 pm, a... at mac.com (Alex Martelli) wrote:
> jupiter <anil.jupit... at gmail.com> wrote:
>
>    ...
>
> > Python 2.5. At this moment I am using Sqlite3 which is pretty fast but
> > it dosent allow me to use multi threading so which database module is
> > better in terms of multithreading
>
> Perhaps psycopg2 (with PostgreSQL as the engine), according to
> <http://cheeseshop.python.org/pypi/psycopg2/2.0.2> it is specifically
> "designed for heavily multi-threaded applications that create and
> destroy lots of cursors and make a conspicuous number of concurrent
> INSERTs or UPDATEs".
>
> Alex

conn = psycopg2.connect("dbname=test user=test")

Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    conn = psycopg2.connect("dbname=test user=test")
OperationalError: could not connect to server: Connection refused
(0x0000274D/10061)
	Is the server running on host "???" and accepting
	TCP/IP connections on port 5432?

this is the error I am getting with psycopg2 I want to access a local
file




More information about the Python-list mailing list