[pygtk] Handling strings from gtk.Entries

David López Luengo olelen at gmail.com
Tue Dec 29 05:17:33 WST 2009


Hi everybody there!, here's a quick question.

I'm getting the text from an entry:

<gtk.Entry-instance>.get_text()

Which actually has 'text text \xff text text'. This strings is returned "as
is", this mean, with each character, including \ and x and f and f, all I
want to do is just get the same string BUT with the scaped character "\xff"
as just one byte, I have read gtk.Entry reference and I think it is not
possible from there, instead of that I have to get the text "as is" and then
manipulate it to transform those four bytes not escaped in just one escaped
character. Do you know how to do that? I suppose it is possible using
functions of python str class but which and how?. This could be a question
for "python strings mailing list", but I'm sure someone have this problem
before.

Thanks for your wisdom :)



-- 
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20091228/cca69b04/attachment.htm 


More information about the pygtk mailing list