Re: working with csv module in python

2013-02-20 Thread inshu chauhan
On Wed, Feb 20, 2013 at 12:04 PM, Dave Angel wrote: > On 02/20/2013 05:38 AM, inshu chauhan wrote: > >> On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler >> wrote: >> >> >>> >>> >>> >>> If you only want to concat the files, I would use some shell-tools, >>> like "cat" on Linux or "copy" on Windo

Re: working with csv module in python

2013-02-20 Thread Dave Angel
On 02/20/2013 06:01 AM, inshu chauhan wrote: For simple concating the files , I tried the following code : import glob with open(r"C:\Users\inshu.chauhan\Desktop\test2.arff", "w") as w: print w for f in glob.glob(r"C:\Users\inshu.chauhan\Desktop\For Model_600\*.arff"): You fo

Re: working with csv module in python

2013-02-20 Thread Dave Angel
On 02/20/2013 05:38 AM, inshu chauhan wrote: On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler wrote: If you only want to concat the files, I would use some shell-tools, like "cat" on Linux or "copy" on Windows, so copy C:\Users\inshu.chauhan\Desktop\ForModel_600\*.arff C:\Users\inshu.chauh

Re: working with csv module in python

2013-02-20 Thread inshu chauhan
On Wed, Feb 20, 2013 at 11:38 AM, inshu chauhan wrote: > > > > On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler wrote: > >> Hi, >> >> On Wed, Feb 20, 2013 at 10:50:54AM +0100, inshu chauhan wrote: >> > I have 10 simple text files with 3 columns x,y,z delimited by "space". >> I am >> > trying to co

Re: working with csv module in python

2013-02-20 Thread Peter Otten
inshu chauhan wrote: > Yes I just want to concat the files , not parse/mangle the files. How > can > i simply read all files in a folder in my computer and write them into a > single file ? just by 'printf ' is it possible ? Assuming the files' last line always ends with a newline and the files

Re: working with csv module in python

2013-02-20 Thread inshu chauhan
On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler wrote: > Hi, > > On Wed, Feb 20, 2013 at 10:50:54AM +0100, inshu chauhan wrote: > > I have 10 simple text files with 3 columns x,y,z delimited by "space". I > am > > trying to combine these 10 files to get a single text file. > > > > Eg. of data in

Re: working with csv module in python

2013-02-20 Thread Roland Koebler
Hi, On Wed, Feb 20, 2013 at 10:50:54AM +0100, inshu chauhan wrote: > I have 10 simple text files with 3 columns x,y,z delimited by "space". I am > trying to combine these 10 files to get a single text file. > > Eg. of data in 10 files is > 299 446 2 Do you only want to concat the files, or do you

working with csv module in python

2013-02-20 Thread inshu chauhan
I have 10 simple text files with 3 columns x,y,z delimited by "space". I am trying to combine these 10 files to get a single text file. Eg. of data in 10 files is 299 446 2 I had written this prog for merging files: import csv import glob with open(r"C:\Users\inshu.chauhan\Desktop\test2.arff"