in reply to Re: Check whether a file is open
in thread Check whether a file is open

To see if it's opened by your own program, use fileno. [Update] Of course, you use fileno on handles rather than on filenames, which is probably not what the OP wants to do. (thanks, tlm)

Caution: Contents may have been coded under pressure.