rupa / j2

python version of z, for experimentation
240 stars 23 forks source link

--posix option for awk call to avoid problems with locale settings #4

Open juergen-vogel opened 11 years ago

juergen-vogel commented 11 years ago

I had the problem that awk saved 0.9*l[i] with a comma instead of a floating point. As a consequence the python script failed with the error message

ValueError: invalid literal for float(): 18,9

By adding the posix option to the awk call we get sure that the right floating point is used despite of your locale configuration.

http://www.gnu.org/software/gawk/manual/html_node/Conversion.html

rupa commented 11 years ago

Huh, what awk are you using that does this? This repo is outdated and obsolete, but this might be useful for z, which uses tons of awk itself.