windows系统中文件名不能包含 \ / : * ? " < > |想要创建必须过滤掉这些字符
import re def filename_filter(filename): filename = re.sub('[\/:*?"<>|]','',filename) return filename
windows系统中文件名不能包含 \ / : * ? " < > |想要创建必须过滤掉这些字符
import re def filename_filter(filename): filename = re.sub('[\/:*?"<>|]','',filename) return filename