atof problem.

jepler epler jepler.lnk at lnk.ispi.net
Sat Jul 15 09:03:17 EDT 2000


On Fri, 14 Jul 2000 03:23:11 GMT, William Dandreta
 <wjdandreta at worldnet.att.net> wrote:
>Hi Jeff,
>
>I guess my question was poorly worded. I was looking for the way to set the
>internal thousands separator to a comma so atof('1,142.00') results in
>1142.00. It's clear from the doc's that it is posssible to do but it doesn't
>give enough info for me to figure out how.

Look at locale.atof() instead of string.atof or the builtin float().

You may need to recompile your python so that the _locale module is
included, however.

Jeff



More information about the Python-list mailing list