After reading a file is it possible to write to it without first closing it? I tried opening with 'rw' access and re-winding. This does not seem to work unless comments are removed.
Also, does close force a flush? Thanks, jh #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ f = open('c:\\tempMaxq\\incidents.txt', 'rw') s = f.read() lst = s.split() incId = [] incId.extend([lst.pop(), lst.pop()]) #f.close() #f = open('c:\\tempMaxq\\incidents.txt', 'w') #f.seek(0) for el in lst: f.write(el + ' ') f.close() -- http://mail.python.org/mailman/listinfo/python-list