If all you care about is the current process, an easy way is to use the file object attribute "closed" f = open('file.py') if f.closed: print 'file is ...
確定! 回上一頁