eric6/Globals/__init__.py

changeset 7639
422fd05e9c91
parent 7360
9190402e4505
child 7641
21ea4fd50b0a
equal deleted inserted replaced
7638:176145438b1e 7639:422fd05e9c91
420 def strToQByteArray(txt): 420 def strToQByteArray(txt):
421 """ 421 """
422 Module function to convert a Python string into a QByteArray. 422 Module function to convert a Python string into a QByteArray.
423 423
424 @param txt Python string to be converted 424 @param txt Python string to be converted
425 @type str, bytes, bytearray, unicode 425 @type str, bytes, bytearray
426 @return converted QByteArray 426 @return converted QByteArray
427 @rtype QByteArray 427 @rtype QByteArray
428 """ 428 """
429 if isinstance(txt, str): 429 if isinstance(txt, str):
430 txt = txt.encode("utf-8") 430 txt = txt.encode("utf-8")

eric ide

mercurial