Hello Dani, 2009/12/17 Dani <danin...@gmail.com>: > Is it correct that low-level file handles are not being closed after > doing > fd = open(filepath) > fd.close() > If so, what is the rationale?
No, it is incorrect. I tested that exact snippet here and it correctly closes the file. I can move the file around just after that. There must be something wrong elsewhere on your code. That said, you could use the "with" statement in python >2.5 to make it clearer: with open(filepath) as fd: # ... do stuff with fd ... The file will be closed at the end of the with block. nosklo -- http://mail.python.org/mailman/listinfo/python-list