opath.py 224 Bytes
Newer Older
Sugon_ldc's avatar
Sugon_ldc committed
1
2
3
4
5
6
7
8
9
10
11
12
import re


# 检查中文
def check_cn(path):
    zh_model = re.compile(u'[\u4e00-\u9fa5]')
    return zh_model.search(path)


# 替换斜杠
def normcase(path):
    return eval(repr(path).replace('\\\\', '/'))