tkinter + unicode + bug or feature??

Jp Calderone exarkun at intarweb.us
Fri Jan 24 13:54:20 EST 2003


On Fri, Jan 24, 2003 at 11:28:19AM -0700, Bob van der Poel wrote:
> 
> [snip]
> 
> So, can I force tkinter to return non-unicode strings? Or can I write a 
> function to convert all my Entry widget strings to be non-unicode. And, 
> I am dreaming that this is a new problem? I recently upgraded my Linux 
> box to mandrade 9.0 and it has installed python 2.2.1.
> 

  Python MegaWidgets provides an EntryField class that lets you specify
arbitrary validation functions for the input.  You could use it, or write
your own mini-subclass of Entry that -just- prevents unicode input, and then
use that class instead of Entry.  I'm not aware of a solution that will let
you continue using Tkinter.Entry and not get unicode input (at least, one
that isn't a dirty hack).

  Jp

-- 
A sad spectacle.  If they be inhabited, what a scope for misery 
and folly.  If they be not inhabited, what a waste of space.
                -- Thomas Carlyle, looking at the stars
-- 
 up 39 days, 21:49, 1 user, load average: 0.81, 0.64, 0.57
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030124/4cfe667a/attachment.sig>


More information about the Python-list mailing list