def write(path, data, kind='OTHER', dohex=False):
assertType1(data)
kind = kind.upper()
try:
os.remove(path)
except os.error:
pass
err = 1
try:
if kind == 'LWFN':
writeLWFN(path, data)
elif kind == 'PFB':
writePFB(path, data)
else:
writeOther(path, data, dohex)
err = 0
finally:
if err and not DEBUG:
try:
os.remove(path)
except os.error:
pass
# -- internal --
评论列表
文章目录