You could wrap your paramter dict in a class instance with something like:

class Parameters(object):
    def __init__(self, parameterDict):
        self.__dict__ = parameterDict.copy()
        # NB: copying may not be necissary for your case

parms = Parameters(dict(a=1,b=2,c=3))
print parms.a, parms.b, parms.c


On 21 Mar 2006 14:05:49 -0800, Joseph Turian < [EMAIL PROTECTED]> wrote:

Fredrik Lundh wrote:

> if you prefer to use a " parameters.value" syntax, you can wrap the resulting
> dictionary in a class.

That sounds good. How do I do that?

> I assume "from" means "beneath" and "getcwd" means "walk" ?

Actually:
def superdirs(d):
  lst = [d]
  while d != os.environ["HOME"]:
    (d, tl) = os.path.split(d)
    lst += [d]
  lst.reverse()
  return lst


   Joseph

--
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to