splittype('type:opaquestring') --> 'type', 'opaquestring'.
(url)
| 1242 | |
| 1243 | _typeprog = None |
| 1244 | def _splittype(url): |
| 1245 | """splittype('type:opaquestring') --> 'type', 'opaquestring'.""" |
| 1246 | global _typeprog |
| 1247 | if _typeprog is None: |
| 1248 | _typeprog = re.compile('([^/:]+):(.*)', re.DOTALL) |
| 1249 | |
| 1250 | match = _typeprog.match(url) |
| 1251 | if match: |
| 1252 | scheme, data = match.groups() |
| 1253 | return scheme.lower(), data |
| 1254 | return None, url |
| 1255 | |
| 1256 | |
| 1257 | def splithost(url): |
no test coverage detected
searching dependent graphs…