Lookup up the codec for the given encoding and return its StreamReader class or factory function. Raises a LookupError in case the encoding cannot be found.
(encoding)
| 1016 | return decoder |
| 1017 | |
| 1018 | def getreader(encoding): |
| 1019 | |
| 1020 | """ Lookup up the codec for the given encoding and return |
| 1021 | its StreamReader class or factory function. |
| 1022 | |
| 1023 | Raises a LookupError in case the encoding cannot be found. |
| 1024 | |
| 1025 | """ |
| 1026 | return lookup(encoding).streamreader |
| 1027 | |
| 1028 | def getwriter(encoding): |
| 1029 |