[Zope] Mysql-Connection in Python-Script

AM list_subscriber@neurobs.com
Wed, 18 Dec 2002 11:25:45 -0800


import MySQLdb, _mysql
db_con = MySQLdb.connect (host = Self.server,
                               port = Self.port,
                               user = Self.user,
                               passwd = Self.password,
                               db = Self.db_name)

Unfortunately this is what I do in a python product. I dont know if 
PyScripts will allow you to import MySQLdb modules. You could of course 
always got he external scripts way and return the connection object ot 
the calling script.

hth
AM


Lukas Pitschl wrote:

>I would like to use a Mysql-Connection in a Zope-Python-Script.
>Could someone explain how that works?
>
>I have to import some CSV-data into a database
>
>thanks in advance
>
>lukas
>  
>

-- 
==================================================================
 Aseem Mohanty							   
 Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 
 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231		  	
==================================================================								  	
 "I saw `cout' being shifted "Hello world" times to the left and  
  stopped right there!!"                        -- Steve Gonedes  
==================================================================