Is there any python functions such as:
filename = \"a.txt\" if is_open(filename) and open_status(filename)==\'w\': print filename,\" is open for writing\"
I don't think there is an easy way to do what you want, but a start could be to redefine open() and add your own managing code. That said, why do you want to do that?