Dictionary from a file
Thomas Weholt
thomas at bibsyst.no
Mon Jan 24 04:02:09 EST 2000
"Peter Schopfer (aka Dr. J. - magician)" wrote:
>
> Hello
>
> I have a dictionary that is too big to fit right in my program, so i was
> going to have it as a seperat file, labeled dic.py. how would i be able
> to retrieve this dictionary. wuld this work:
>
> from dic.py import dictionary
> mydic=dic.dictionary
>
> i am a newbie, so any help would be appreciated
> thanks
>
> keagan
Or you could use a key-based database. Look into the shelve-docs in
www.python.org.
Thomas
More information about the Python-list
mailing list