def parse_params(s): """Read key=value pairs from a string or list of string and return a standard Python dictionary""" p = PuPyDictionary(s) return dict(p)
def args_str(D): """Construct args string from file, string or mapping object""" return str(PuPyDictionary(D))