-
-
Save maliciousgroup/0a0bf19480cb3602c3d97795d21e5f45 to your computer and use it in GitHub Desktop.
Abstract Console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import abc | |
class AbstractConsole(metaclass=abc.ABCMeta): | |
@abc.abstractmethod | |
async def interactive_shell(self) -> None: | |
""" | |
Abstract Coroutine that will handle user-supplied commands | |
:return: None | |
""" | |
@abc.abstractmethod | |
async def print_processor(self) -> None: | |
""" | |
Abstract Coroutine that will handle the print queue | |
:return: None | |
""" | |
@staticmethod | |
@abc.abstractmethod | |
async def shutdown(_loop) -> None: | |
""" | |
Abstract Coroutine that gracefully shuts down application | |
:param _loop: Main Event Loop | |
:return: None | |
""" | |
@abc.abstractmethod | |
async def main(self) -> None: | |
""" | |
Abstract Coroutine that starts the event loops | |
:return: None | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment