(s)
| 71 | return param |
| 72 | |
| 73 | def _parseparam(s): |
| 74 | # RDM This might be a Header, so for now stringify it. |
| 75 | s = ';' + str(s) |
| 76 | plist = [] |
| 77 | while s[:1] == ';': |
| 78 | s = s[1:] |
| 79 | end = s.find(';') |
| 80 | while end > 0 and (s.count('"', 0, end) - s.count('\\"', 0, end)) % 2: |
| 81 | end = s.find(';', end + 1) |
| 82 | if end < 0: |
| 83 | end = len(s) |
| 84 | f = s[:end] |
| 85 | if '=' in f: |
| 86 | i = f.index('=') |
| 87 | f = f[:i].strip().lower() + '=' + f[i+1:].strip() |
| 88 | plist.append(f.strip()) |
| 89 | s = s[end:] |
| 90 | return plist |
| 91 | |
| 92 | |
| 93 | def _unquotevalue(value): |