def setWritable(self, state=True):
"""
sets the writeable flag (ie: !readonly)
"""
try:
setTo = stat.S_IREAD
if state:
setTo = stat.S_IWRITE
os.chmod(self, setTo)
except:
pass