Faster display of text

Salim Zayat zayats at
Fri Jan 18 10:32:25 EST 2002

Hey there.  I am writing this tree-drawing application in tkinter which 
is meant to display arabic text.  The only problem is that it is 
extremely slow in printing all the arabic text to the Canvas widget which 
does all the displaying.  When I replace the arabic text with regular 
English strings, it works markedly faster.  Is this a problem with my 
encoding of it (currently \x escape encoded) or is it merely in Python's 
manner of displaying other languages?  

For what it's worth, I am never sure in the program whether the text I am 
to display will be English or Arabic, so I just pass it straight through 
every time to the canvas:

canvas.create_text(xpos, ypos, text=whatever that chunk is).

Is this too inefficient?  

Sorry about all the writing.  Thanks!


More information about the Python-list mailing list