Re: [Tutor] write list to columns

2012-04-13 Thread Mark Lawrence
On 13/04/2012 08:47, questions anon wrote: thanks all! No problem, but I would like like to point out, albeit repeating myself, that my normal profesional fees apply, i.e. two pints of Ringwood Old Thumper or equivalent should you ever be in my neck of the woods. -- Cheers. Mark Lawrence.

Re: [Tutor] write list to columns

2012-04-13 Thread questions anon
thanks all! On Fri, Apr 13, 2012 at 2:02 AM, Alan Gauld wrote: > On 12/04/12 15:32, Mark Lawrence wrote: > > That's going to be quite awkward to do. Files like to be written one >>> complete line at a time. The normal approach would be to build up the >>> table structure in memory and then write

Re: [Tutor] write list to columns

2012-04-12 Thread Alan Gauld
On 12/04/12 15:32, Mark Lawrence wrote: That's going to be quite awkward to do. Files like to be written one complete line at a time. The normal approach would be to build up the table structure in memory and then write the entire table out in one go. Built-in zip? Or have I missed something

Re: [Tutor] write list to columns

2012-04-12 Thread Mark Lawrence
On 12/04/2012 08:48, Alan Gauld wrote: On 12/04/12 03:31, questions anon wrote: I am trying to simply write a list of values to txt file in one column. I would then like to add another list in a second column. That's going to be quite awkward to do. Files like to be written one complete line a

Re: [Tutor] write list to columns

2012-04-12 Thread Alan Gauld
On 12/04/12 06:33, questions anon wrote: Perfect, thank you. Is there a way I could easily/quickly add headings to each column? Headings are no different to any other line of text... with open('output.txt', 'w') as f: write your headings here for record in records:

Re: [Tutor] write list to columns

2012-04-12 Thread Alan Gauld
On 12/04/12 03:31, questions anon wrote: I am trying to simply write a list of values to txt file in one column. I would then like to add another list in a second column. That's going to be quite awkward to do. Files like to be written one complete line at a time. The normal approach would be

Re: [Tutor] write list to columns

2012-04-11 Thread questions anon
Perfect, thank you. Is there a way I could easily/quickly add headings to each column? On Thu, Apr 12, 2012 at 1:03 PM, Puneeth Chaganti wrote: > On Thu, Apr 12, 2012 at 8:01 AM, questions anon > wrote: > > I am trying to simply write a list of values to txt file in one column. > > I would then

Re: [Tutor] write list to columns

2012-04-11 Thread Puneeth Chaganti
On Thu, Apr 12, 2012 at 8:01 AM, questions anon wrote: > I am trying to simply write a list of values to txt file in one column. > I would then like to add another list in a second column. > Somehow they only appear as one long row. > Any feedback will be greatly appreciated. You will need to wri

Re: [Tutor] write list to columns

2012-04-11 Thread शंतनू
On 12-Apr-2012, at 8:01 AM, questions anon wrote: > I am trying to simply write a list of values to txt file in one column. > I would then like to add another list in a second column. > Somehow they only appear as one long row. > Any feedback will be greatly appreciated. > > print "rain max va

[Tutor] write list to columns

2012-04-11 Thread questions anon
I am trying to simply write a list of values to txt file in one column. I would then like to add another list in a second column. Somehow they only appear as one long row. Any feedback will be greatly appreciated. print "rain max values", rmax print "yearmonth", monthyear OutputFolder=r"E:/test_o