I now get
Traceback (most recent call last):
File "./pyowfs_test3.py", line 22, in <module>
room = LivingRoom (connection)
File "./pyowfs_test3.py", line 11, in __init__
self.sensor = connection.find (id = self.id)[0]
IndexError: list index out of range
Regards
Mick
On Tue, 2010-04-06 at 23:49 +0200, Marcus Priesch wrote:
> Hi Mick,
>
> Am Dienstag, den 06.04.2010, 22:36 +0100 schrieb Mick Sulley:
> > Hi Marcus,
> >
> > Tried your code, needed a colon at the end of
> >
> > def __init__ (connection)
> >
> > but now I get
> >
> > Traceback (most recent call last):
> > File "./pyowfs_test3.py", line 22, in <module>
> > room = LivingRoom (connection)
> > TypeError: __init__() takes exactly 1 argument (2 given)
> >
> > and I have no idea what to do about that, my Python skills do not extend
> > that far.
>
> yup, sorry, that was my fault ... the self was missing ...
>
> it should be:
>
> class Sensor (object) :
> id = None
> def __init__ (self, connection)
> self.conn = connection
> self.sensor = connection.find (id = self.id)[0]
>
> hope now it works ...
>
> regards,
> marcus.
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers