Need help with file object
Unix SA
d.joshi84 at gmail.com
Thu Dec 12 23:29:25 EST 2013
Hello,
I am facing some issue when copying or moving file
f=open('/tmp/file1')
s=open('/tmp/file2')
for line in f:
if 'match' not in line:
s.write(line)
import shutil
shutil.move(s, f)
With above prog I am getting error
TypeError: coercing to Unicode: need sting or buffer, file found
What that means and how I can resolve it.
Regards,
Dj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131213/10edf4bf/attachment.html>
More information about the Python-list
mailing list