Project-wide variable...

Gnarlodious gnarlodious at gmail.com
Thu Jun 23 14:01:46 EDT 2011


On Jun 23, 11:42 am, Noah Hall wrote:

> > What about using an environment variable?
>
> Yes, that's fine, but only if the data is suitable for it.

In this case, the variable is a namespace containing the property of a
folder full of plist files. I access any dictionary item anywhere in
my webapp with a namespace like this:

Data.Plist.SectrumDB.Sectrum.Contents.Character.Type
> Unicode string

There are hundreds of these dictionary items in the namespace, and it
has been a powerful programming tool. I simply wonder if there is a
more elegant way of giving my entire application access to these
variables from the top. Apparently not, from what I gather.

-- Gnarlie
http://Gnarlodious.com



More information about the Python-list mailing list