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 5797069 commit 7a92a27Copy full SHA for 7a92a27
javaobj/v2/main.py
@@ -3,9 +3,15 @@
3
Mimics the core API with the new deserializer
4
"""
5
6
-from io import BytesIO
7
from typing import Any, IO, Iterable
8
+try:
9
+ # Python 2
10
+ from StringIO import StringIO as BytesIO
11
+except ImportError:
12
+ # Python 3+
13
+ from io import BytesIO
14
+
15
from .api import ObjectTransformer
16
from .core import JavaStreamParser
17
from .transformers import DefaultObjectTransformer, NumpyArrayTransformer
0 commit comments