Skip to content
Snippets Groups Projects
Commit c8bac599 authored by Michael Langguth's avatar Michael Langguth
Browse files

Added is_interger-auxilary function to 'metadata.py'.

parent db35a2c1
No related branches found
No related tags found
No related merge requests found
......@@ -248,6 +248,17 @@ def add_str_to_path(path_in,add_str):
return(line_str)
def is_integer(n):
'''
Checks if input string is numeric and of type integer.
'''
try:
float(n)
except ValueError:
return False
else:
return float(n).is_integer()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment