Re: error with files

2014-08-18 Thread Rock Neurotiko
You are trying to write the open file (file1) in the file type. I think that you wanted to write in file1, the data: file1.write(file_data) # instead of file.write(file1) 2014-08-18 11:41 GMT+02:00 ngangsia akumbo : > error > > yems ~ # nano testfile1 > yems ~ # python testfile1 > Enter fil

Re: error with files

2014-08-18 Thread ngangsia akumbo
Thanks guys -- https://mail.python.org/mailman/listinfo/python-list

Re: error with files

2014-08-18 Thread Peter Otten
ngangsia akumbo wrote: > error > > yems ~ # nano testfile1 > yems ~ # python testfile1 > Enter file name: g > write in data: g > Traceback (most recent call last): > File "testfile1", line 11, in > file.write(file1) > TypeError: function takes exactly 1 argument (0 given) > > > > impo

Re: error with files

2014-08-18 Thread Paul Wiseman
The line should be: file1.write(file_data) you could write file.write(file1, file_data) but that would be an odd way to do it :) On 18 August 2014 10:41, ngangsia akumbo wrote: > error > > yems ~ # nano testfile1 > yems ~ # python testfile1 > Enter file name: g > write in data: g > Tracebac

error with files

2014-08-18 Thread ngangsia akumbo
error yems ~ # nano testfile1 yems ~ # python testfile1 Enter file name: g write in data: g Traceback (most recent call last): File "testfile1", line 11, in file.write(file1) TypeError: function takes exactly 1 argument (0 given) import os.path save_here = '/home/yems/newfile/' file_n