Re: writelines puzzle

2012-08-22 Thread William R. Wing (Bill Wing)
On Aug 22, 2012, at 1:28 PM, Jerry Hill wrote: > On Wed, Aug 22, 2012 at 11:38 AM, William R. Wing (Bill Wing) > wrote: >> Much to my surprise, when I looked at the output file, it only contained 160 >> characters. Catting produces: >> >> StraylightPro:Logs wrw$ cat RTT_monitor.dat >> 2354[ 7

Re: writelines puzzle

2012-08-22 Thread Dave Angel
On 08/22/2012 02:00 PM, William R. Wing (Bill Wing) wrote: > On Aug 22, 2012, at 12:48 PM, Chris Kaynor wrote: > >> Reading your post, I do not see for sure what your actual issue is, so >> I am taking my best guess: that the file does not contain as much data >> as would be expected. >> > Sorry,

Re: writelines puzzle

2012-08-22 Thread William R. Wing (Bill Wing)
On Aug 22, 2012, at 12:48 PM, Chris Kaynor wrote: > Reading your post, I do not see for sure what your actual issue is, so > I am taking my best guess: that the file does not contain as much data > as would be expected. > Sorry, I should have been more explicit. The value of "i" in this instan

Re: writelines puzzle

2012-08-22 Thread Peter Otten
William R. Wing (Bill Wing) wrote: > In the middle of a longer program that reads and plots data from a log > file, I have added the following five lines (rtt_data is fully qualified > file name): > > wd = open(rtt_data, 'w') > stat = wd.write(str(i)) > stat = wd.writelines(str(x_dates[:i])) > st

Re: writelines puzzle

2012-08-22 Thread Jerry Hill
On Wed, Aug 22, 2012 at 11:38 AM, William R. Wing (Bill Wing) wrote: > Much to my surprise, when I looked at the output file, it only contained 160 > characters. Catting produces: > > StraylightPro:Logs wrw$ cat RTT_monitor.dat > 2354[ 734716.72185185 734716.72233796 734716.72445602 ..., 7347

Re: writelines puzzle

2012-08-22 Thread Joel Goldstick
On Wed, Aug 22, 2012 at 11:38 AM, William R. Wing (Bill Wing) wrote: > In the middle of a longer program that reads and plots data from a log file, > I have added the following five lines (rtt_data is fully qualified file name): > > wd = open(rtt_data, 'w') > stat = wd.write(str(i)) > stat = wd.w

Re: writelines puzzle

2012-08-22 Thread Chris Kaynor
Reading your post, I do not see for sure what your actual issue is, so I am taking my best guess: that the file does not contain as much data as would be expected. On Wed, Aug 22, 2012 at 8:38 AM, William R. Wing (Bill Wing) wrote: > In the middle of a longer program that reads and plots data fro

writelines puzzle

2012-08-22 Thread William R. Wing (Bill Wing)
In the middle of a longer program that reads and plots data from a log file, I have added the following five lines (rtt_data is fully qualified file name): wd = open(rtt_data, 'w') stat = wd.write(str(i)) stat = wd.writelines(str(x_dates[:i])) stat = wd.writelines(str(y_rtt[:i])) wd.close() The