src/eric7/DebugClients/Python/DebugUtilities.py

branch
eric7
changeset 9500
5771348ded12
parent 9473
3f23dbf37dbe
child 9571
0e2ab682dfa3
equal deleted inserted replaced
9499:dd389c57c2f0 9500:5771348ded12
198 if os.path.exists(program): 198 if os.path.exists(program):
199 with open(program) as f: 199 with open(program) as f:
200 for line in f: 200 for line in f:
201 line = line.strip() 201 line = line.strip()
202 if line: 202 if line:
203 for name in PYTHON_NAMES: # __IGNORE_WARNING_Y110__ 203 return any(
204 if line.startswith("#!/usr/bin/env {0}".format(name)) or ( 204 line.startswith("#!/usr/bin/env {0}".format(name))
205 line.startswith("#!") and name in line 205 or (line.startswith("#!") and name in line)
206 ): 206 for name in PYTHON_NAMES
207 return True 207 )
208 return False
209 else: 208 else:
210 return False 209 return False
211 except UnicodeDecodeError: 210 except UnicodeDecodeError:
212 return False 211 return False
213 except Exception: 212 except Exception:

eric ide

mercurial