Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6245d4e commit c7e98aaCopy full SHA for c7e98aa
lib/matplotlib/animation.py
@@ -27,7 +27,12 @@
27
import platform
28
import sys
29
import itertools
30
-import base64
+try:
31
+ # python3
32
+ from base64 import encodebytes
33
+except ImportError:
34
+ # python2
35
+ from base64 import encodestring as encodebytes
36
import contextlib
37
import tempfile
38
from matplotlib.cbook import iterable, is_string_like
@@ -928,7 +933,7 @@ def to_html5_video(self):
928
933
929
934
# Now open and base64 encode
930
935
with open(f.name, 'rb') as video:
931
- vid64 = base64.encodebytes(video.read())
936
+ vid64 = encodebytes(video.read())
932
937
self._base64_video = vid64.decode('ascii')
938
self._video_size = 'width="{0}" height="{1}"'.format(
939
*writer.frame_size)
0 commit comments