Speed ups to the comma/decimal handing problem
svn: r482
This commit is contained in:
parent
3ac7238d7a
commit
c99d7472a0
@ -125,10 +125,11 @@ else:
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def txt2fl(st):
|
||||
if _use_comma:
|
||||
if _use_comma:
|
||||
def txt2fl(st):
|
||||
return string.atof(string.replace(st,'.',','))
|
||||
else:
|
||||
else:
|
||||
def txt2fl(st):
|
||||
return string.atof(string.replace(st,',','.'))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -136,8 +137,12 @@ def txt2fl(st):
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def fl2txt(fmt,val):
|
||||
if _use_comma:
|
||||
def fl2txt(fmt,val):
|
||||
return string.replace(fmt % val, ',', '.')
|
||||
else:
|
||||
def fl2txt(fmt,val):
|
||||
return fmt % val
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user