Re: [MonetDB-users] import error in python script

Yes i did that but didn't work..
You should set PYTHONPATH to something like /prefix/lib/python2.5/site-packages
Can you confirm?
Thanx, Lazaros.
On Thu, Mar 12, 2009 at 08:36:08PM +0530, Ranadeeran wrote:
hi all i use MonetDB Database Server Toolkit v0.4 and ubuntu 8.10. im unable to issue any of the monetdb commands without prefixing them with a ./ that is instead of mserver5,it works only when i give ./mserver5
And im able to issue these commands only when im in the bin directory though i ve permanantly set the PATH variable in .bash_profile
when i try to connect to monetdb using the sample python script that is given in the docs,i get an import error telling unable to import MonetDbSQL,though i ve set the PYTHONPATH variable to /prefix/lib/python2.5/site-packages/MonetDb directory
the script is import MonetSQLdb # Let the cursor return dictionaries instead of tuples: # x = MonetSQLdb.connect(cursorclass = MonetSQLdb.cursors.DictCursor) x = MonetSQLdb.connect(host = 'localhost', user = 'monetdb',password = 'monet\db', lang = 'sql') #x = MonetSQLdb.connect(lang='sql') c = x.cursor() c.execute('select * from test') #print c.fetchone() print c.fetchall() x.close()
But the script works fine on Debian Etch.
i need to overcome these two issues...
Thanks in advance, Mahesh
----------------------------------------- This email was sent using TCEMail Service. Thiagarajar College of Engineering Madurai - 625015 (India)
participants (1)
-
Ranadeeran