awtk/scripts/utils.py

7 lines
165 B
Python
Raw Normal View History

2024-01-09 16:52:55 +08:00
def strtobool(value):
if(isinstance(value, str)):
value = value.lower()
if value in ("y", "yes", "on", "1", "true", "t"):
return True
return False