Hi Thanks a lot for your quick response.
I used pip to install pyowfs with no problem (found out I had to install libow-dev for it to work) Made my wrapper to its capi, and it looks MUCH better. Threads seem responsive again. Are there exceptions thrown when a sensor read goes wrong? Thanks again. On Tue, Sep 18, 2012 at 4:47 PM, Marcus Priesch <mar...@priesch.priv.at> wrote: > Hello Sophana, > > i dont know if it would help the gil issue, but you could try pyowfs > (easy_install pyowfs) wihich basically is a ctypes wrapper around > libow. > > starting a owserver instance and then talking via different pyowfs > Connections (one in each thread) to the owserver should not block the > other threads ... ?!?! - hmmm, it's not much effort so you could give it > a try ... > > however, i never did much with threads and owfs in python ... > > all the best, and please give feedback if this works for you !!! > > marcus. > > ps: more info on pyowfs on pypi ... ;) > > On Die, 2012-09-18 at 16:21 +0200, Sophana K wrote: >> Hi >> >> I'm using owfs 2.8p13 on ubuntu precise and have a problem with the ow >> python library. >> This library seems to be a wrapper to the C owfs library. >> The problem is that because of the python GIL, my other python threads >> get busy while an access to the ow server is made. >> The workaround is to use owfs filesystem instead of the ow library. >> The problem with this workaround, is that when a temperature sensor >> gives an error, it is not detected correctly, and the temperature >> value seems to be 0. >> >> I have an older python only library, but it doesn't seem to work >> correctly with this new owserver. >> dir requests work ok. But when I do a read request, I receive the >> following message header: >> '\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' >> which unpacks to: >> (0, -1, 0, 0, 0, 0) >> >> Is it normal that the payload_len is negative? This breaks the library >> which calls socket.ntohl on this, but it doesn't support negative >> values. >> >> the corresponding request is: >> >> '\x00\x00\x00\x00\x00\x00\x00E\x00\x00\x00\x02\x00\x00\x01"\x00\x00 >> \x00\x00\x00\x00\x00' >> (read, len=len(path)+1, size=8192) >> >> Is the protocole description >> http://owfs.org/index.php?page=owserver-protocol is still accurate? >> >> Please note that a python only version of the library would be very >> cool, as I intend to use gevent to handle socketio, and access >> owserver through a monkey patched greenlet. >> >> Thanks for your support >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Owfs-developers mailing list >> Owfs-developers@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/owfs-developers >> > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers