def chmod ( f ) : try : os . chmod ( f , S_IWRITE ) # windows (cover all) except Exception as e : pass try : os . chmod ( f , 0o777 ) # *nix except Exception as e : pass
chmod + w python
change mod to writeable
def chmod(f):
    """ change mod to writeable """
    try:
        os.chmod(f, S_IWRITE)  # windows (cover all)
    except Exception as e:
        pass
    try:
        os.chmod(f, 0o777)  # *nix
    except Exception as e:
        pass