Re: Unable to Concatenate a file - destination kept getting overwritten

2012-04-20 Thread Peter Otten
Chris Angelico wrote: > On Sat, Apr 21, 2012 at 11:03 AM, Foster Rilindo wrote: >> Is this right way to concatenate a file or is there a better way? > > I'd be inclined to ignore shutil and simply open one file for reading, > the other for appending, and manually transfer data from one to the >

Re: Unable to Concatenate a file - destination kept getting overwritten

2012-04-20 Thread Foster Rilindo
Nevermind. Dumb mistake. I should have used: destination = open(disk1,'ab') Doh. On Apr 20, 2012, at 8:03 PM, Foster Rilindo wrote: > I can't seem to concatenate. > > I got binary files here: > > yvaine:disk rilindo$ ls -lah > total 61440 > drwxr-xr-x 4 rilindo staff 136B Apr 20 19:47

Re: Unable to Concatenate a file - destination kept getting overwritten

2012-04-20 Thread MRAB
On 21/04/2012 02:03, Foster Rilindo wrote: I can't seem to concatenate. I got binary files here: yvaine:disk rilindo$ ls -lah total 61440 drwxr-xr-x 4 rilindo staff 136B Apr 20 19:47 . drwxr-xr-x 10 rilindo staff 340B Apr 20 19:45 .. -rw-r--r-- 1 rilindo staff20M Apr 20 20:00 di

Re: Unable to Concatenate a file - destination kept getting overwritten

2012-04-20 Thread Dave Angel
On 04/20/2012 09:03 PM, Foster Rilindo wrote: > I can't seem to concatenate. > > I got binary files here: > > yvaine:disk rilindo$ ls -lah > total 61440 > drwxr-xr-x 4 rilindo staff 136B Apr 20 19:47 . > drwxr-xr-x 10 rilindo staff 340B Apr 20 19:45 .. > -rw-r--r-- 1 rilindo staff20

Re: Unable to Concatenate a file - destination kept getting overwritten

2012-04-20 Thread Chris Angelico
On Sat, Apr 21, 2012 at 11:03 AM, Foster Rilindo wrote: > Is this right way to concatenate a file or is there a better way? I'd be inclined to ignore shutil and simply open one file for reading, the other for appending, and manually transfer data from one to the other. open(disk1,"ab").write(ope