src/eric7/UI/PythonDisViewer.py

branch
eric7
changeset 10964
3ce89f2d4729
parent 10963
895cff2305a7
child 10979
960fe726594c
equal deleted inserted replaced
10963:895cff2305a7 10964:3ce89f2d4729
908 fn = filename if filename else "<dis>" 908 fn = filename if filename else "<dis>"
909 co = tryCompile(co, fn) 909 co = tryCompile(co, fn)
910 except SyntaxError: 910 except SyntaxError:
911 return [] 911 return []
912 912
913 starts = [inst[1] for inst in dis.findlinestarts(co) if inst is not None] 913 starts = [inst[1] for inst in dis.findlinestarts(co) if inst[1] is not None]
914 if getall: 914 if getall:
915 for x in co.co_consts: 915 for x in co.co_consts:
916 if hasattr(x, "co_code"): 916 if hasattr(x, "co_code"):
917 starts.extend(linestarts(x)) 917 starts.extend(linestarts(x))
918 return sorted(starts) 918 return sorted(starts)

eric ide

mercurial