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 def capture(camera): if camera in CAMERAS: if camera = 'A': function = capture_A if camera = 'B': function = capture_B if camera = 'C': function = capture_C # call function function() else return On Fri, Feb 4, 2011 at 2:39 PM, Wanderer <wande...@dialup4less.com> 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 think it's inheritance. Maybe there is no official thing here > and I just need to brute force my way through it. Is there some > programming methodology I should be using? > > Thanks > -- > http://mail.python.org/mailman/listinfo/python-list > -- George R. C. Silva Desenvolvimento em GIS http://blog.geoprocessamento.net
-- http://mail.python.org/mailman/listinfo/python-list