You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def getUserYN(self, query="Please Enter Y or N :"):
"""
Reads Y/N user response to the query.
Args:
query (str, optional): Query to the user. Defaults to "".
Returns:
bool: returns the response. True for 'y'/'Y', False for 'n'/'N'.
"""
if self.log is not None:
self.log.debug(query)
while True:
response = input(query).strip().lower() # Converts input to lowercase for simplicity
if response == 'y' or response == 'Y' :
return True
elif response == 'N' or response == 'n':
return False
else:
print("Invalid input. Please enter 'y' for Yes or 'n' for No.")
The text was updated successfully, but these errors were encountered:
def getUserYN(self, query="Please Enter Y or N :"):
"""
Reads Y/N user response to the query.
The text was updated successfully, but these errors were encountered: