J. Cliff Dyer <jcd <at> sdf.lonestar.org> writes: > > readlines() reads all the lines from the filehandle, but the filehandle > hasn't signalled that it is done writing lines, so fo is waiting until > fi is complete. You either need to keep reading one line at a time, and > manually release control when there's nothing more to read, or you need > to do an fi.close() before you try to use fo.readlines(). > >
Thanks... It worked as you said. Here is how I coded it: ->>> fi.writelines(["uno\n","dos\n","tres\n"]) ->>> fi.close() ->>> l = fo.readlines() ->>> l ['uno\n', 'dos\n', 'tres\n'] --Sergio -- http://mail.python.org/mailman/listinfo/python-list