database

Sreekant Kodela sreekantk at freenet.co.uk
Mon Jul 12 00:04:37 EDT 1999


Hi

Yes to your question re: using databases. You can download postgresql or mysql
etc dbm interfaces. Eg: PyGreSQL et al. Then

import pg
con=pg.connect('skodela')
res=con.query('select * from uselessdb')
con.close()
res=res.getresult()
for n in res:
    print n

just an example. I am using postgreSQL and Python.

Regards
sreekant

dzsi wrote:

> hi,
>
> i am new to python.......
>
> i have a database (comma separated text), and i would like to get some data
> out of it based on some query. let's say there are seven fields, f1...f7,
> and i am searching for entries in f1, and want to display f1..f7  for the
> field that matches the query. how do i go about doing that?
>
> also, can i access db databases, or any other common pc type databases with
> perl scripts only on a unix system? without any server configuration,
> assuming python is installed. so far, the comma separated text file is the
> only way i could figure out.
>
> thanks,
>
> adam.





More information about the Python-list mailing list