def print_stack_trace(proc_obj, count=None, color='<STR_LIT>', opts={}):
if count is None:<EOL><INDENT>n=len(proc_obj.stack)<EOL><DEDENT>else:<EOL><INDENT>n=min(len(proc_obj.stack), count)<EOL><DEDENT>try:<EOL><INDENT>for i in range(n):<EOL><INDENT>print_stack_entry(proc_obj, i, color=color, opts=opts)<EOL><DEDENT><DEDENT>except KeyboardInterrupt:<EOL><INDENT>pass<EOL><DEDENT>return<EOL>
Print count entries of the stack trace