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
Hi , im trying to extend the "Input" class to add a simple folder path validator, but the code seems to be ignoring my accept and valid methods.
What am I doing wrong?
from bullet import Input, keyhandler, styles
from bullet.charDef import NEWLINE_KEY
import os.path
class FolderPathCheck(Input):
@keyhandler.register(NEWLINE_KEY)
def accept(self):
if self.valid():
return super.accept()
def valid(self, ans):
return os.path.isdir(self.ans)
Thanks.
The text was updated successfully, but these errors were encountered:
Hi , im trying to extend the "Input" class to add a simple folder path validator, but the code seems to be ignoring my accept and valid methods.
What am I doing wrong?
Thanks.
The text was updated successfully, but these errors were encountered: