12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- """Callback interface
- To be used when UI needs to be back to get info from user.
- """
- class Callback:
- """Callback interface. Callback classes must implement this."""
- def getinput(self, question):
- """Return text"""
- pass
-
- def getsecret(self, question):
- """Return key"""
- pass
- def error(self, error):
- """Present error to user"""
- pass
- def warning(self, warning):
- """Present warning to user"""
- pass
- def notice(self, warning):
- """Present notice to user"""
- pass
- class CallbackCancelException(Exception):
- def __init__(self, message):
- self.message = message
- def __str__(self):
- return "CallbackCancelException: %s" % (self.message)
|