GUI:-please answer want to learn GUI programming in python , how should i proceed.

wxjmfauth at gmail.com wxjmfauth at gmail.com
Tue Dec 17 07:19:03 EST 2013


Le mardi 17 décembre 2013 10:29:28 UTC+1, Steven D'Aprano a écrit :
> On Mon, 16 Dec 2013 23:58:15 -0800, wxjmfauth wrote:
> 
> 
> 
> > From all the toolkits, wxPython is probably the most interesting. I used
> 
> > all versions from 2.0 (?) up to 2.8. Then it has been decided to go
> 
> > unicode.
> 
> > 
> 
> > Let see in the wx interactive intepreter, it is only the top of the
> 
> > iceberg. (Py27, wxPy294)
> 
> > 
> 
> >>>> len('ሴЃ')
> 
> > 5
> 
> 
> 
> 
> 
> What does that have to do with wxPython? It looks like you're just mis-
> 
> using Python 2.7.
> 
> 
> 
> In Python 2.7, 'ሴЃ' is not a Unicode string, it is a byte string. The 
> 
> exact bytes you get are not well-defined but on many systems you may get 
> 
> a UTF-8 encoded byte string:
> 
> 
> 
> 
> 
> py> sys.version
> 
> '2.7.4 (default, Apr 18 2013, 17:48:59) \n[GCC 4.4.5]'
> 
> py> for b in 'ሴЃ':
> 
> ...     print hex(ord(b)), b
> 
> ... 
> 
> 0xe1 
> 
> 0x88 �
> 
> 0xb4 �
> 
> 0xd0 
> 
> 0x83 �
> 
> 
> 
> 
> 
> If you use a Unicode string instead:
> 
> 
> 
> py> for c in u'ሴЃ':
> 
> ...     print hex(ord(c)), c
> 
> ... 
> 
> 0x1234 ሴ
> 
> 0x403 Ѓ
> 
> 
> 
> py> for b in u'ሴЃ'.encode('utf-8'):
> 
> ...     print hex(ord(b)), b
> 
> ... 
> 
> 0xe1 
> 
> 0x88 �
> 
> 0xb4 �
> 
> 0xd0 
> 
> 0x83 �
> 
> 
> 
> 
> 
> 
> 
> Even if it is true that wxPython cannot handle Unicode text, you haven't 
> 
> shown it here.
> 
> 
> 
> 
> 
> 
Quich answer.

That's PyShell, the wxPy interpreter.

You are right in pointing all this missmatch: byte string,
unicode, utf-8, mixing a "unicode" tool kit wiht a non
unicode native engine, plus plenty of related things, ...

You may be not aware. I contributed to wxPython from
practically 2.0, 2.1. 2.2 during 6, 7, 8 yeaurs, testing,
reporting about/with all versions, then I gave up.

---

Yout quote.
"Even if it is true that wxPython cannot handle Unicode text..."

It's a confusing vision and that's not correct. It's a little bit
more complicate than this.

jmf





More information about the Python-list mailing list