Show More
@@ -13,6 +13,7 b' import struct' | |||||
13 | import sys |
|
13 | import sys | |
14 | import warnings |
|
14 | import warnings | |
15 | from copy import deepcopy |
|
15 | from copy import deepcopy | |
|
16 | from os.path import splitext | |||
16 |
|
17 | |||
17 | from IPython.utils.py3compat import cast_unicode |
|
18 | from IPython.utils.py3compat import cast_unicode | |
18 | from IPython.testing.skipdoctest import skip_doctest |
|
19 | from IPython.testing.skipdoctest import skip_doctest | |
@@ -1278,7 +1279,13 b' class Image(DisplayObject):' | |||||
1278 | return self._data_and_metadata() |
|
1279 | return self._data_and_metadata() | |
1279 |
|
1280 | |||
1280 | def _find_ext(self, s): |
|
1281 | def _find_ext(self, s): | |
1281 | return s.split('.')[-1].lower() |
|
1282 | base, ext = splitext(s) | |
|
1283 | ||||
|
1284 | if not ext: | |||
|
1285 | return base | |||
|
1286 | ||||
|
1287 | # `splitext` includes leading period, so we skip it | |||
|
1288 | return ext[1:].lower() | |||
1282 |
|
1289 | |||
1283 |
|
1290 | |||
1284 | class Video(DisplayObject): |
|
1291 | class Video(DisplayObject): |
General Comments 0
You need to be logged in to leave comments.
Login now