On Feb 4, 12:07 pm, Jean-Michel Pichavant
wrote:
> Wanderer wrote:
> > I have a bunch of cameras I want to run tests on. They each have
> > different drivers and interfaces. What I want to do is create python
> > wrappers so that they all have a common interface and can be called by
> > the same p
Wanderer wrote:
I have a bunch of cameras I want to run tests on. They each have
different drivers and interfaces. What I want to do is create python
wrappers so that they all have a common interface and can be called by
the same python test bench program. I'm not sure what to call it. I
don't th
Take a look at the strategy pattern. But with python being a dinamic
language, you probably won't need to implement it like that.
http://en.wikipedia.org/wiki/Strategy_pattern
Example:
# import all you need
CAMERAS = ['A','B','C']
def capture_A:
pass
def capture_B:
pass
def capture_C:
pass
I have a bunch of cameras I want to run tests on. They each have
different drivers and interfaces. What I want to do is create python
wrappers so that they all have a common interface and can be called by
the same python test bench program. I'm not sure what to call it. I
don't think it's inheritan