A SÃb, 2004-03-20 Ãs 22:28, Jakub Piotr CÅapa escreveu:
> Martin Grimme wrote:
> >
> > Yes, gnome.program_init() does bad things now. It changes the LC_NUMERIC
> > locale setting which is used to determine if "." or "," is
> > used as the decimal point.
> > See http://bugzilla.gnome.org/show_bug.cgi?id=135055
> >
> > I had the same problems and fixed it like this:
> >
> > program = gnome.program_init(NAME, VERSION)
> >
> > # gnome.program_init has the bad new habit to modify the locale
> > # settings (bug #135055); repair it
> > import locale; locale.setlocale(locale.LC_NUMERIC, "C")
> >
> Thanks for help. :)
> I thought that locale should be automaticaly imported from the
> enviroment. It seems that newer gnome.init started to do this itself.
> >
> >>When I set LC_ALL to "C" everything works fine. It seems that gnome.init
> >>somehow modifies standard python way of handling literals according to
> >>the locale. That's a really Bad Thing(TM).
> >
> > I fully agree. But the real problem is that Python uses locale-sensitive
> > libc-functions for parsing floats.
> >
> Why? It is a really strange (and stupid) idea. It would break any
> programs written in one locale (with ,) and run in another (with .). :/
Everybody, contact your local Python representative (kiko) to push the
LC_NUMERIC patch into the next python release! ;)
http://www.async.com.br/~kiko/pep-numeric.txt
--
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/