Re: A clean way to program an interface

2007-07-11 Thread rh0dium
On Jul 9, 1:19 pm, rh0dium <[EMAIL PROTECTED]> wrote: Hi all, OK so I've started re-writing this based on the feedback you all gave me. How does this look? class Scanner: def __init__(self, *args, **kwargs): """description""" # Setup Logging self.log = logging.getLo

Re: A clean way to program an interface

2007-07-09 Thread rh0dium
On Jul 9, 9:59 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > I believe the OP is talking about "interface" as in "hardware > interface", using some form of serial communication. His example does > not use pyserial, but it does refer to a "UnidenConnection" class, > with parameters such as bitrate,

Re: A clean way to program an interface

2007-07-09 Thread Paul McGuire
I believe the OP is talking about "interface" as in "hardware interface", using some form of serial communication. His example does not use pyserial, but it does refer to a "UnidenConnection" class, with parameters such as bitrate, port, etc. for what looks like serial communication. Some general

Re: A clean way to program an interface

2007-07-09 Thread Diez B. Roggisch
rh0dium wrote: > On Jul 9, 3:53 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> THROW IT AWAY >> >> Seriously. That's one of the most convoluted, incomprehensible pieces of >> python I've seen. Ever. >> >> All the sys._getframe()-stuff has to go. Really. There are about a dozen >> pieces

Re: A clean way to program an interface

2007-07-09 Thread rh0dium
On Jul 9, 3:53 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > THROW IT AWAY > > Seriously. That's one of the most convoluted, incomprehensible pieces of > python I've seen. Ever. > > All the sys._getframe()-stuff has to go. Really. There are about a dozen > pieces of code worldwide that ar

Re: A clean way to program an interface

2007-07-09 Thread Diez B. Roggisch
rh0dium wrote: > Hi all, > > I got this new radio scanner (toy!!) this weekend and I can access it > via a serial cable. I want to write a interface around it but I am > looking for some suggestions. I thought at first I would simply class > the Scanner and write the various methods as attibutes