{Spam?} Re: [Tutor] Pulling data from a DBaseIV file

Bob Gailer bgailer at alum.rpi.edu
Wed Feb 11 16:43:21 EST 2004


At 12:09 PM 2/11/2004, Andrew Eidson wrote:
>The ODBC information I find only pertains to SQL based
>systems.. I have not been able to find any information
>for a DbaseIV file..

What operating system? If windows, you can set up an ODBC for dBase using 
the data sources applet. Let's say you call it "boreland".

Then:
import odbc
conn = odbc.odbc('boreland')
cursor = conn.cursor()
cursor.execute('select * from table')
rows = cursor.fetchall()

Now you have a sequence of rows, each row being a sequence of columnvalues

There is, as I recall, a CSV module that will create CSV files.

Bob Gailer
bgailer at alum.rpi.edu
303 442 2625 home
720 938 2625 cell  




More information about the Tutor mailing list