I am trying to evaluate if the string in one of the textbox of my interface is a number (i.e. not text or anything else). In Python, there is a method called isdigit() that will return True if the string only contains digits (no negative signs or decimal points). Is there another way I could evaluate if my string is a rational number (ex: 1.25).
Example code:
if self.components.txtZoomPos.text.isdigit():
step = int(self.components.txtZoomPos.text)