Re: [Tutor] Append function

2005-02-01 Thread Kent Johnson
You seem to be giving a path to a directory rather than a single file. Also you are putting it in the wrong place, you should edit the allFiles list. Kent kumar s wrote: Hi Kent, Thank you for your suggestion. I keep getting IOError permission denied every time I try the tips that you provided

Re: [Tutor] Append function

2005-02-01 Thread kumar s
Hi Kent, Thank you for your suggestion. I keep getting IOError permission denied every time I try the tips that you provided. I tried to lookup on this error and did not get reasonable answer. Is this error something to do with Windows OS? Any suggestions. Thank you K >>> allColumns = [readC

Re: [Tutor] Append function

2005-02-01 Thread kumar s
Hi Danny: I have ~50 files in this format: File1: 680:209 3006.3 266:123 250.5 62:393 117.3 547:429 161.5 341:311 546.5 132:419 163.3 98:471 306.3 File 2: 266:123 168.0 62:393 119.3 547:429 131.0 341:311 162.3 132:419 149.5 98:471 85.0 289:215 207.0 75:553 517.0 I am generating these fi

Re: [Tutor] Append function

2005-01-31 Thread Danny Yoo
On Sun, 30 Jan 2005, kumar s wrote: > I have a bunch of files where the first column is always the same. I > want to collect all those files, extract the second columns by file wise > and write the first column, followed by the other columns(extracted from > files) next to each other. Hi Kumar

Re: [Tutor] Append function

2005-01-30 Thread Kent Johnson
zip() is your friend. It turns rows into columns and columns into rows. I think this will do what you want, assuming all the first columns are identical (no missing rows in any files), the row values are separated by spaces or tabs, and all the data will fit in memory: def readColumns(filePath):

[Tutor] Append function

2005-01-30 Thread kumar s
Hello: In append function instead of appending one below the other can I append one next to other. I have a bunch of files where the first column is always the same. I want to collect all those files, extract the second columns by file wise and write the first column, followed by the other colum