lineno, line=line))
except OSError:
pass ## file (probably __stderr__) is invalid, warning dropped.
- warnings.showwarning = idle_showwarning
def idle_formatwarning(message, category, filename, lineno, line=None):
"""Format warnings the IDLE way"""
s = "\nWarning (from warnings module):\n"
s += " %s\n" % line
s += "%s: %s\n>>> " % (category.__name__, message)
return s
- warnings.formatwarning = idle_formatwarning
def extended_linecache_checkcache(filename=None,
orig_checkcache=linecache.checkcache):
def main():
global flist, root, use_subprocess
+ warnings.showwarning = idle_showwarning
+ warnings.formatwarning = idle_formatwarning
+
use_subprocess = True
enable_shell = False
enable_edit = False
s += " %s\n" % line
s += "%s: %s\n" % (category.__name__, message)
return s
- warnings.formatwarning = idle_formatwarning_subproc
tcl = tkinter.Tcl()
global exit_now
global quitting
global no_exitfunc
+
+ warnings.formatwarning = idle_formatwarning_subproc
+
no_exitfunc = del_exitfunc
#time.sleep(15) # test subprocess not responding
try: