Skip to content

Commit

Permalink
add isnot_num function
Browse files Browse the repository at this point in the history
  • Loading branch information
hernanchavezthielemann authored May 21, 2019
1 parent e77ab63 commit 23841a1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/misc/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,16 @@ def check_vars( _vars_, _varstype_, _endtext_ = 'Input script not created!'):


return _flag_c_

def isnot_num( _string_):
''' return True if the string is not numeric
'''
_flag_ = True
try:
float( _string_)
_flag_ = False
except ValueError:
pass
return _flag_

# vim:tw=80

0 comments on commit 23841a1

Please sign in to comment.