69 def __mimeFromUrl(self, url): |
69 def __mimeFromUrl(self, url): |
70 """ |
70 """ |
71 Private method to guess the mime type given an URL. |
71 Private method to guess the mime type given an URL. |
72 |
72 |
73 @param url URL to guess the mime type from (QUrl) |
73 @param url URL to guess the mime type from (QUrl) |
|
74 @return mime type for the given URL (string) |
74 """ |
75 """ |
75 path = url.path() |
76 path = url.path() |
76 ext = os.path.splitext(path)[1].lower() |
77 ext = os.path.splitext(path)[1].lower() |
77 if ext in ExtensionMap: |
78 if ext in ExtensionMap: |
78 return ExtensionMap[ext] |
79 return ExtensionMap[ext] |