(name, value, env=None, seperator=':')
prepend a new value to a list
prepend a new value to a list
prepend a new value to a list
def prepend_env_value(name, value, env=None, seperator=':'):
        '''prepend a new value to a list'''
        if env is None:
            env = os.environ

        try:
            current_value = env[name]
        except KeyError:
            current_value = ''

        new_value = value
        if current_value:
            new_value += seperator + current_value

        env[name] = new_value
def prepend_env_value ( name , value , env = None , seperator = ':' ) : if env is None : env = os . environ try : current_value = env [ name ] except KeyError : current_value = '' new_value = value if current_value : new_value += seperator + current_value env [ name ] = new_value