From: Roger B. <ro...@ro...> - 2003-12-17 08:55:55
|
> You can see changes on individual files with the viewcvs. The code for > the Sanyo 4900/8100 is in the files com_sanyo4900.py, com_sanyo.py, and > p_sanyo.p. BTW it is really easy to make a seperate module for the 8100 and share all code, with any exceptions you want to make. I did it for the VX6000 and VX4400. Here is how: com_sanyo4900: ====== class Phone(...): protocolclass=p_sanyo4900 desc="Sanyo 4900" def calendar(self): # whereever you need protocol objects, instantiate them like this req=self.protocolclass.calendarentry() ====== p_sanyo8100: ====== %{ # This brings all objects from sanyo4900 into this namespace from p_sanyo4900 import * %} # you can put any overrides here, eg if the calendarentry is # a different size PACKET calendarentry: 99 STRING description ====== com_sanyo8100: ====== class Phone(com_sanyo4900.Phone): protocolclass=p_sanyo8100 desc="Sanyo 8100" def __init__(self): com_sanyo4900.Phone.__init__(self) ======= The above will let you have seperate files for the phones, but share all the code except whatever you decide to override. It also means the user will see the correct phone model in any log messages. Roger |