Originariamente inviato da freetom
Traceback (most recent call last):
File "D:\PERtoglieregliacapo.py", line 2, in ?
fo.open('nomefile2.txt', 'w')
AttributeError: 'file' object has no attribute 'open'

A te il tuo script che hai postato funge?

GRAZIE COMQUE!
Scusa, troppa fretta

codice:
fi = open('nomefile.txt', 'r')
fo = open('nomefile2.txt', 'w')
fo.write(fo.read().replace('\n', ''))
fo.close()
fi.close()