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)
python类shebang_matches()的实例源码
def analyse_text(text):
return shebang_matches(text, r'julia')
def analyse_text(text):
return shebang_matches(text, r'ruby(1\.\d)?')
def analyse_text(text):
return shebang_matches(text, r'(tcl)')
def analyse_text(text):
if shebang_matches(text, r'(ba|z|)sh'):
return 1
if text.startswith('$ '):
return 0.2
def analyse_text(text):
return shebang_matches(text, r'pythonw?(2(\.\d)?)?') or \
'import ' in text[:1000]
def analyse_text(text):
return shebang_matches(text, r'pythonw?3(\.\d)?')
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)
def analyse_text(text):
return shebang_matches(text, r'julia')
def analyse_text(text):
return shebang_matches(text, r'ruby(1\.\d)?')
def analyse_text(text):
return shebang_matches(text, r'(tcl)')
def analyse_text(text):
if shebang_matches(text, r'(ba|z|)sh'):
return 1
if text.startswith('$ '):
return 0.2
def analyse_text(text):
return shebang_matches(text, r'pythonw?(2(\.\d)?)?') or \
'import ' in text[:1000]
def analyse_text(text):
return shebang_matches(text, r'pythonw?3(\.\d)?')
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)