To add to the closed topic. (: Massimo and I worked over this with PySerial and yeah, having a separate program to manage the serial connection is actually VITAL. Especially if your making devices that send important other data. Have that external app just update a file in queue with information, and when you need it displayed in the webbrowser you can just make a request for the status from that file. This is similar to the issues found in a webcam. You don't make the web application take a picture of a file when a webpage requests it as it would pile full of requests and errors as everyone is trying to use the same device. With a file, like an image, everyone should have access to it very easily. In my setup I was dealing with industrial robots, some logic had to be done faster than the webbrowser could do it. So having a "machine server" as we call it at work, helps take care of those common logic steps so that web2py doesn't worry about it. BR, Jason Brower
On Sat, 2010-04-17 at 01:46 -0700, aabelyakov wrote: > Yes, this is the right decision! > Topic closed. > Thanks > > On 16 апр, 17:30, mdipierro <[email protected]> wrote: > > I think there is a problem with multithreading because of PySerial. > > Pyserial open a post connected to COM and COM is a resource that > > cannot be shared. In web2py every request is executed in its own > > thread so it is not obvious who open the COM, who closes it and how > > conflicts are avoided. > > > > Please tell us more of what you are doing. The best solution may be > > not to use pyserial in a web2py problem but use it in a single > > bachground process that talks to web2py via queued messages. > > > > Massimo > > > > On Apr 16, 2:13 am, aabelyakov <[email protected]> wrote: > > > > > > > > > I do not use os.chdir or explicit calls to thread module. > > > I'm using PySerial and after the error COM port remains open. > > > To close it, I restart the web server. > > > How to avoid this? > > > > > On 15 ÁÐÒ, 22:46, mdipierro <[email protected]> wrote: > > > > > > Do you use os.chdir or explicit calls to the thread module in your > > > > code? > > > > > > On Apr 15, 12:15špm, aabelyakov <[email protected]> wrote: > > > > > > > During my application error occurs and it stops giving error ticket. > > > > > > > How can I in my application to return the resources of the operating > > > > > system > > > > > (eg close the COM port) šbefore the error ticket not to restart the > > > > > web server? > > > > > > > Excuse my bad English... > > > > > > > Regards- óËÒÙÔØ ÃÉÔÉÒÕÅÍÙÊ ÔÅËÓÔ - > > > > > > - ðÏËÁÚÁÔØ ÃÉÔÉÒÕÅÍÙÊ ÔÅËÓÔ - > > > > > -- > > > Subscription > > > settings:http://groups.google.com/group/web2py/subscribe?hl=en- Скрыть > > > цитируемый текст - > > > > - Показать цитируемый текст -

