3 Star 6 Fork 1

lonewolf / pythonDev

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
helper.py 688 Bytes
一键复制 编辑 原始数据 按行查看 历史
lonewolf 提交于 2014-10-28 19:58 . init
import sublime
import os
import hashlib
import sys
# read content from a file
def readFile(path):
f = open(path, "r")
content = f.read()
f.close()
return content
# write content to a file
def writeFile(path, content):
f = open(path, "w+")
f.write(content)
f.close()
# check file extention
def checkFileExt(file,ext):
ext1 = os.path.splitext(file)[1][1:]
if ext1 == ext:
return True
else:
return False
def md5(str):
return hashlib.md5(str.encode(sys.getfilesystemencoding())).hexdigest()
def isST3():
return sublime.version()[0] == '3'
def loadSettings(name):
return sublime.load_settings(name+".sublime-settings")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/lonewolf/pythonDev.git
git@gitee.com:lonewolf/pythonDev.git
lonewolf
pythonDev
pythonDev
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891