open([path, [encoding]]) If you do not provide any encoding, it can be detected if the file contain a bit order mark, unless it is set to utf-8 as default.
(cls, path='', encoding=None, error_handling=ERROR_PASS)
| 142 | |
| 143 | @classmethod |
| 144 | def open(cls, path='', encoding=None, error_handling=ERROR_PASS): |
| 145 | """ |
| 146 | open([path, [encoding]]) |
| 147 | |
| 148 | If you do not provide any encoding, it can be detected if the file |
| 149 | contain a bit order mark, unless it is set to utf-8 as default. |
| 150 | """ |
| 151 | new_file = cls(path=path, encoding=encoding) |
| 152 | source_file = cls._open_unicode_file(path, claimed_encoding=encoding) |
| 153 | new_file.read(source_file, error_handling=error_handling) |
| 154 | source_file.close() |
| 155 | return new_file |
| 156 | |
| 157 | @classmethod |
| 158 | def from_string(cls, source, **kwargs): |
no test coverage detected