python类shebang_matches()的实例源码

python.py 文件源码 项目:chalktalk_docs 作者: loremIpsum1771 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return (shebang_matches(text, r'pythonw?(2(\.\d)?)?') or
                'import ' in text[:1000]) \
            and ('import numpy' in text or 'from numpy import' in text)
julia.py 文件源码 项目:chalktalk_docs 作者: loremIpsum1771 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'julia')
ruby.py 文件源码 项目:chalktalk_docs 作者: loremIpsum1771 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'ruby(1\.\d)?')
tcl.py 文件源码 项目:chalktalk_docs 作者: loremIpsum1771 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'(tcl)')
shell.py 文件源码 项目:chalktalk_docs 作者: loremIpsum1771 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def analyse_text(text):
        if shebang_matches(text, r'(ba|z|)sh'):
            return 1
        if text.startswith('$ '):
            return 0.2
python.py 文件源码 项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'pythonw?(2(\.\d)?)?') or \
            'import ' in text[:1000]
python.py 文件源码 项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'pythonw?3(\.\d)?')
python.py 文件源码 项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return (shebang_matches(text, r'pythonw?(2(\.\d)?)?') or
                'import ' in text[:1000]) \
            and ('import numpy' in text or 'from numpy import' in text)
julia.py 文件源码 项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'julia')
ruby.py 文件源码 项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'ruby(1\.\d)?')
tcl.py 文件源码 项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'(tcl)')
shell.py 文件源码 项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def analyse_text(text):
        if shebang_matches(text, r'(ba|z|)sh'):
            return 1
        if text.startswith('$ '):
            return 0.2
python.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'pythonw?(2(\.\d)?)?') or \
            'import ' in text[:1000]
python.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return shebang_matches(text, r'pythonw?3(\.\d)?')
python.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def analyse_text(text):
        return (shebang_matches(text, r'pythonw?(2(\.\d)?)?') or
                'import ' in text[:1000]) \
            and ('import numpy' in text or 'from numpy import' in text)


问题


面经


文章

微信
公众号

扫码关注公众号