需要对url参数进行转码;
try:fh = open("testfile", "w")
fh.write("This is my test file for exception handling!!")
except IOError:
print "Error: can\'t find file or read data"
else:
print "Written content in the file successfully"
fh.close()
欢迎分享,转载请注明来源:内存溢出
需要对url参数进行转码;
try:fh = open("testfile", "w")
fh.write("This is my test file for exception handling!!")
except IOError:
print "Error: can\'t find file or read data"
else:
print "Written content in the file successfully"
fh.close()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)