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