My bad but there is no need to modify cache.py or you will run into trouble. It is just that
ser = cache.ram("ser+, serial.Serial(0,9600), indefinite) should be ser = cache.ram("ser+, lambda: serial.Serial(0,9600), indefinite) On Oct 28, 12:39 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Just to report back, I got this working. > > I did however hit an error in cache.py: > > Traceback (most recent call last): > File "Z:\winWeb2Py\web2py\gluon\restricted.py", line 62, in > restricted > exec ccode in environment > File "Z:\winWeb2Py\web2py\applications\hpv/controllers/inout.py", > line 11, in <module> > ser = cache.ram("ser",serial.Serial(),indefinite) > File "Z:\winWeb2Py\web2py\gluon\cache.py", line 36, in __call__ > raise e > TypeError: 'Serial' object is not callable > > I modified cache.py to: > try: > try: > value=f() > except TypeError: > value=f > self.storage[key]=(time.time(),value) > except BaseException, e: > self.locker.release() > raise e > > And it worked as expected. > > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---