add stubs for pluggable implementations
This commit is contained in:
13
implementation/__init__.py
Normal file
13
implementation/__init__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import os
|
||||
import glob
|
||||
import abc
|
||||
|
||||
modules = glob.glob(os.path.dirname(__file__) + '/*.py')
|
||||
__all__ = [os.path.basename(f)[:-3] for f in modules]
|
||||
|
||||
class ibuddy:
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
@abc.abstractmethod
|
||||
def test(self):
|
||||
return
|
||||
5
implementation/local.py
Normal file
5
implementation/local.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from . import ibuddy
|
||||
|
||||
class local(ibuddy):
|
||||
def test(self):
|
||||
print('test local')
|
||||
5
implementation/remote.py
Normal file
5
implementation/remote.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from . import ibuddy
|
||||
|
||||
class remote(ibuddy):
|
||||
def test(self):
|
||||
print('test remote')
|
||||
Reference in New Issue
Block a user