I'm trying to work with the recently released ownet python classes (ownet-0.2). This is on an unslung Slug (6.8) if it matters. I am running into a problem when trying to traverse a 2409 swtich. Now, part of the problem may be that I learning python at the same time, so please forgive me if I am barking up the wrong tree. Please see below:
# python Python 2.4.4 (#1, Nov 8 2006, 11:28:40) [GCC 3.3.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ownet >>> r Sensor("/1F.A6D500000000", server="127.0.0.1", port=3002) >>> s=r.sensorList() Sensor.sensorList(['main', 'aux']) Sensor.sensors(['main', 'aux']) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/opt/local/lib/python2.4/site-packages/ownet/__init__.py", line 415, in sensorList return [s for s in self.sensors()] File "/opt/local/lib/python2.4/site-packages/ownet/__init__.py", line 378, in sensors for branch_entry in list.split(','): AttributeError: 'list' object has no attribute 'split' >>> (For debugging purposes, I uncommented the two print statements, hence the two lines showing the list ['main', 'aux'].) The problem with line 378 is due to line 376: list = filter(lambda x: '/' in x, self._connection.dir(self._usePath)) list is a list returned by filter, and split is a string method, thus the error. I'll work on fixing this, but someone that is truly python literate should probably do the official patch/fix. Any insights or instruction would be appreciated. Thanks! ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers