Re: Converging Multiple Classes

2011-02-04 Thread Wanderer
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

Re: Converging Multiple Classes

2011-02-04 Thread Jean-Michel Pichavant
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

Re: Converging Multiple Classes

2011-02-04 Thread George Silva
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

Converging Multiple Classes

2011-02-04 Thread Wanderer
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