On Wed, Dec 17, 2008 at 1:38 AM, Joel Hedlund <[email protected]> wrote:
> > ... > > Using float(b.get_text()) does not work, because the text is > internationallized and may have decimal commas and other weird things > that python does not like. Using locale.atof(b.get_text()) does not work > either, because in the en_US locale the string "0,11" is interpreted by > the SpinButton as 0 and by locale.atof as 11. For integers it's no > easier, because "50,1,,1" is interpreted by the SpinButton as 50 and by > locale.atof as 5011. > > ... > Have you tried using the get_value() function of gtk.SpinButton() ? Usually that is how I retrieve the value of it. I haven't tried it with using locales though so there might be some other way. -- b3rx "Don't be trapped by dogma - which is living with the results of other people's thinking. - Steve Jobs" `There are only 10 types of people in the world — those who understand binary, and those who don't.'
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
