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 think the best way to do that is to try.
def is_already_opened_in_write_mode(filename) if os.path.exists(filename): try: f = open(filename, 'a') f.close() except IOError: return True return False