I have a python ‘s byte array
b=b'hello'
and I want to use it as the parameter of QtextStream to create a QtextStream 
object ,but QtextStream accept Qt’s byte array rather than Python’s .I wonder 
is there anyway to to convert python ‘s byte array to QByteArray ?

I’ve tested the following code ,it seems I cannot do it in this way .


>>> b=b'hello'
>>> from PyQt4.QtCore import *
>>> c=QTextStream(QByteArray(b)).readAll()
>>> c
''
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to