I am using Python 3.2.1 and I can't import the StringIO
module. I use
io.StringIO
and it works, but I can't use it with numpy
's genfromtxt
like this:
x="1 3
4.5 8"
numpy.genfromtxt(io.StringIO(x))
I get the following error:
TypeError: Can't convert 'bytes' object to str implicitly
and when I write import StringIO
it says
ImportError: No module named 'StringIO'
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…