Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread Robert Voigtländer
This works. Thanks a lot. So sending and receiving works .. with low CPU usage. I need to dig into twisted As a Python starter I want something like serial.send usabel in the main loop and serial.receive to work in the background and only trigger something once data has been received. Obvious

Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread exarkun
On 07:42 pm, ltaylor.vo...@gmail.com wrote: On Oct 21, 2013, at 6:57 AM, Robert Voigtländer wrote: Thanks for the fast reply. I don't yet understand your answer. I may have to dig more into Python. On 21 October 2013 13:45, Itamar Turner-Trauring wrote: 3. A reasonable place for the w

Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread Lucas Taylor
On Oct 21, 2013, at 6:57 AM, Robert Voigtländer wrote: > Thanks for the fast reply. > I don't yet understand your answer. I may have to dig more into Python. > > On 21 October 2013 13:45, Itamar Turner-Trauring wrote: > > 3. A reasonable place for the write() might be in your Protocol's >

Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread Robert Voigtländer
n *Robert > Voigtländer > *Gesendet:* Montag, 21. Oktober 2013 13:57 > *An:* Twisted general discussion > *Betreff:* Re: [Twisted-Python] serial communication - getting started > > ** ** > > Thanks for the fast reply. > > I don't yet understand your answer.

Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread Tobias Oberstein
n: Twisted general discussion Betreff: Re: [Twisted-Python] serial communication - getting started Thanks for the fast reply. I don't yet understand your answer. I may have to dig more into Python. On 21 October 2013 13:45, Itamar Turner-Trauring mailto:ita...@itamarst.org>> wrote: O

Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread Robert Voigtländer
Thanks for the fast reply. I don't yet understand your answer. I may have to dig more into Python. On 21 October 2013 13:45, Itamar Turner-Trauring wrote: > On 10/21/2013 07:35 AM, Robert Voigtländer wrote: > > def SerialInit(): > ... > > reactor.run() > > > thread.start_new_thread(Se

Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread Itamar Turner-Trauring
On 10/21/2013 07:35 AM, Robert Voigtländer wrote: def SerialInit(): ... reactor.run() thread.start_new_thread(SerialInit()) if __name__ == '__main__': print("-") s.write('123456789') #s.write("\n") 1. Twisted is not thread-safe, so you can't call methods on the protocol f