Read a single mime.types-format file, specified by pathname. If strict is true, information will be added to list of standard types, else to the list of non-standard types.
(self, filename, strict=True)
| 237 | return extensions[0] |
| 238 | |
| 239 | def read(self, filename, strict=True): |
| 240 | """ |
| 241 | Read a single mime.types-format file, specified by pathname. |
| 242 | |
| 243 | If strict is true, information will be added to |
| 244 | list of standard types, else to the list of non-standard |
| 245 | types. |
| 246 | """ |
| 247 | with open(filename, encoding='utf-8') as fp: |
| 248 | self.readfp(fp, strict) |
| 249 | |
| 250 | def readfp(self, fp, strict=True): |
| 251 | """ |