[Tutor] best way to get external data

Kent Johnson kent37 at tds.net
Fri May 2 17:40:41 CEST 2008


On Fri, May 2, 2008 at 11:12 AM, Bryan Fodness <bryan.fodness at gmail.com> wrote:
> I am trying to figure out the best way to get external data.

1. Put the data in a Python module and import it
2. Put the data in a .ini file and read it with the ConfigParser
module http://docs.python.org/lib/module-ConfigParser.html

> If I have a long list of 'variable' = 'value', could this be better managed in a dictionary?

Possibly. When you have a list of variables you are trying to create
by name, a dictionary is definitely suggested.

Kent


More information about the Tutor mailing list