Importing database: newbie issue

A

Angelo Secchi

Hi,
I have a database with a fixed format structure (i.e. i know the
starting point and the length of each of the field composing the
database) and I would like to extract from it only few fields (ex the
one starting from the 32nd position with length 12...).
What is the best way to do that?

Thanks
a
 
W

wes weston

Angelo,
If doing this on an ongoing basis, you might
look at using shelve.

from "Python Essential Reference", pg 81

import shelve

object = someObject()
dbase = shelve.open(filename) #open a database
dbase['key'] = object #save object to db
....
object = dbase['key'] #retrieve object
dbase.close()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top