<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>For an app to be built with PyQt5/Qt5, I will have a<br></div>QPlainTextEdit in which the document may be quite<br>sizable, 500K characters or more.<br><br>I will want at times to inspect the document character<br>

by character, or possibly apply Python relib REs to it.<br><br></div>I am somewhat at sea regarding the relationship between<br>a const QString such as returned by QPlainTextEdit.toPlainText()<br></div>and a Python3 unicode string, and -- just in general -- about<br>

the best way to do intensive examination of big strings.<br>Is there a copy involved in, e.g.<br><br></div>    docstring = unicode( myEditor.toPlainText() )<br><br></div>I note that the PyQt4 QString reference omits the <br>

</div>QString.begin() or .constBegin() etc methods that return an<br></div>"STL-style iterator" so that's out. Is there some internal magic<br></div>to integrate the QString type into Python's "for" mechanism<br>

</div>so that "for c in myEditor.toPlainText()" might be more<br></div><div>efficient than making a Python3 string and iterating on it?<br><br></div><div><div>Also in regard to making intensive loops faster, <br>

how well do PyQtx calls integrate with Cython or PyPy?<br><br></div><div>Thanks for any insights,<br><br>Dave Cortesi<br></div><div><br></div></div></div>