Re: Parsing a serial stream too slowly

2012-01-24 Thread Cameron Simpson
On 24Jan2012 05:08, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: | On Tue, 24 Jan 2012 10:49:41 +1100, Cameron Simpson wrote: | | | def OnSerialRead(self, event): | | text = event.data | | self.sensorabuffer = self.sensorabuffer + text | | self.sensorbbuffer =

Re: Parsing a serial stream too slowly

2012-01-24 Thread Ulrich Eckhardt
Am 23.01.2012 22:48, schrieb M.Pekala: I think that regex is too slow for this operation, but I'm uncertain of another method in python that could be faster. A little help would be appreciated. Regardless of the outcome here, I would say that your code is still a bit wonky on the handling of

Re: Parsing a serial stream too slowly

2012-01-24 Thread Thomas Rachel
Am 24.01.2012 00:13 schrieb Thomas Rachel: [sorry, my Thunderbird kills the indentation] And finally, you can make use of re.finditer() resp. sensorre.finditer(). So you can do sensorre = re.compile(r'\$(.)(.*?)\$') # note the change theonebuffer = '$A1234$$B-10$$C987$' # for now

Parsing a serial stream too slowly

2012-01-23 Thread M.Pekala
Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls the sensors, filters them, formats the values, and sends the formatted values over a serial bus. The serial stream comes out like

Re: Parsing a serial stream too slowly

2012-01-23 Thread Jerry Hill
On Mon, Jan 23, 2012 at 4:48 PM, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am When one sensor is running my python script grabs the data just fine, removes the formatting, and throws it into a text control box. However when 3 or

Re: Parsing a serial stream too slowly

2012-01-23 Thread Jon Clements
On Jan 23, 9:48 pm, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls the sensors, filters them, formats the values, and sends the formatted

Re: Parsing a serial stream too slowly

2012-01-23 Thread M.Pekala
On Jan 23, 5:00 pm, Jon Clements jon...@googlemail.com wrote: On Jan 23, 9:48 pm, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls

Re: Parsing a serial stream too slowly

2012-01-23 Thread Thomas Rachel
Am 23.01.2012 22:48 schrieb M.Pekala: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls the sensors, filters them, formats the values, and sends the formatted values over a serial bus.

Re: Parsing a serial stream too slowly

2012-01-23 Thread Nick Dokos
M.Pekala mcdpek...@gmail.com wrote: On Jan 23, 5:00 pm, Jon Clements jon...@googlemail.com wrote: On Jan 23, 9:48 pm, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is

Re: Parsing a serial stream too slowly

2012-01-23 Thread Cameron Simpson
On 23Jan2012 13:48, M.Pekala mcdpek...@gmail.com wrote: | Hello, I am having some trouble with a serial stream on a project I am | working on. I have an external board that is attached to a set of | sensors. The board polls the sensors, filters them, formats the | values, and sends the formatted

Re: Parsing a serial stream too slowly

2012-01-23 Thread M.Pekala
On Jan 23, 6:49 pm, Cameron Simpson c...@zip.com.au wrote: On 23Jan2012 13:48, M.Pekala mcdpek...@gmail.com wrote: | Hello, I am having some trouble with a serial stream on a project I am | working on. I have an external board that is attached to a set of | sensors. The board polls the

Re: Parsing a serial stream too slowly

2012-01-23 Thread Steven D'Aprano
On Tue, 24 Jan 2012 10:49:41 +1100, Cameron Simpson wrote: | def OnSerialRead(self, event): | text = event.data | self.sensorabuffer = self.sensorabuffer + text | self.sensorbbuffer = self.sensorbbuffer + text | self.sensorcbuffer = self.sensorcbuffer + text Slow and