Every line of 'python print line break' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
399 def print_list_lines(self, filename, first, last): 400 """The printing (as opposed to the parsing part of a 'list' 401 command.""" 402 try: 403 Colors = self.color_scheme_table.active_colors 404 ColorsNormal = Colors.Normal 405 tpl_line = '%%s%s%%s %s%%s' % (Colors.lineno, ColorsNormal) 406 tpl_line_em = '%%s%s%%s %s%%s%s' % (Colors.linenoEm, Colors.line, ColorsNormal) 407 src = [] 408 for lineno in range(first, last+1): 409 line = linecache.getline(filename, lineno) 410 if not line: 411 break 412 413 if lineno == self.curframe.f_lineno: 414 line = self.__format_line(tpl_line_em, filename, lineno, line, arrow = True) 415 else: 416 line = self.__format_line(tpl_line, filename, lineno, line, arrow = False) 417 418 src.append(line) 419 self.lineno = lineno 420 421 print >>io.stdout, ''.join(src) 422 423 except KeyboardInterrupt: 424 pass