Move is_numerical() to joy.gui.utils.
This commit is contained in:
@@ -10,6 +10,14 @@ COMMITTER = 'Joy <[email protected]>'
|
||||
DEFAULT_JOY_HOME = expanduser(join('~', '.joypy'))
|
||||
|
||||
|
||||
def is_numerical(s):
|
||||
try:
|
||||
float(s)
|
||||
except ValueError:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def home_dir(path):
|
||||
'''Return the absolute path of an existing directory.'''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user