Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
Hi Dennis, thanks for your reply. Dennis Lee Bieber napsal: > > def dataOnSerialPort(): > > data=s.readLine() > > Unless you are using a custom serial port module, that should be > s.readline() sorry for the typo > > > if data: > > return data > > else: > > return

Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
Maybe I am missing something. Expect data is comming continually to the serial port for the period say 10min. (say form the GPS), than it stops for 1 minute and so on over and over. I would like to log such a data to the different gzip files. My example was written just for the simplicity (I was tr

Re: writing serial port data to the gzip file

2006-12-18 Thread jim-on-linux
If someone hasn't already commented, Aside from any other problems, the file you are trying to write to is (opened)?? in the "w" mode. Every time a file is opened in the 'w' mode, everything in the file is deleted. If you open a file in the 'a' mode, then everything in the file is left un

Re: writing serial port data to the gzip file

2006-12-17 Thread Leo Kislov
Petr Jakes wrote: > I am trying to save data it is comming from the serial port continually > for some period. > (expect reading from serial port is 100% not a problem) > Following is an example of the code I am trying to write. It works, but > it produce an empty gz file (0kB size) even I am sure

writing serial port data to the gzip file

2006-12-17 Thread Petr Jakes
I am trying to save data it is comming from the serial port continually for some period. (expect reading from serial port is 100% not a problem) Following is an example of the code I am trying to write. It works, but it produce an empty gz file (0kB size) even I am sure I am getting data from the s