def __init__(self, initial_values=None):
    MutableInterpreterObject.__init__(self)
    ObjectHolder.__init__(self, build.EnvironmentVariables())
    self.methods.update({'set': self.set_method, 'append': self.append_method, 'prepend': self.prepend_method})
    if isinstance(initial_values, dict):
        for (k, v) in initial_values.items():
            self.set_method([k, v], {})
    elif isinstance(initial_values, list):
        for e in initial_values:
            if ('=' not in e):
                raise InterpreterException('Env var definition must be of type key=val.')
            (k, val) = e.split('=', 1)
            k = k.strip()
            val = val.strip()
            if (' ' in k):
                raise InterpreterException('Env var key must not have spaces in it.')
            self.set_method([k, val], {})
    elif initial_values:
        raise AssertionError('Unsupported EnvironmentVariablesHolder initial_values')
def __init__(self, initial_values=None):
    MutableInterpreterObject.__init__(self)
    ObjectHolder.__init__(self, build.EnvironmentVariables())
    self.methods.update({'set': self.set_method, 'append': self.append_method, 'prepend': self.prepend_method})
    if isinstance(initial_values, dict):
        for (k, v) in initial_values.items():
            self.set_method([k, v], {})
    elif isinstance(initial_values, list):
        for e in initial_values:
            if ('=' not in e):
                raise InterpreterException('Env var definition must be of type key=val.')
            (k, val) = e.split('=', 1)
            k = k.strip()
            val = val.strip()
            if (' ' in k):
                raise InterpreterException('Env var key must not have spaces in it.')
            self.set_method([k, val], {})
    elif initial_values:
        raise AssertionError('Unsupported EnvironmentVariablesHolder initial_values')