MCPcopy Index your code
hub / github.com/python/cpython / begin

Method begin

Lib/idlelib/pyshell.py:1140–1164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1138 SPLASHLINE = 'Enter "help" below or click "Help" above for more information.'
1139
1140 def begin(self):
1141 self.text.mark_set("iomark", "insert")
1142 self.resetoutput()
1143 if use_subprocess:
1144 nosub = ''
1145 client = self.interp.start_subprocess()
1146 if not client:
1147 self.close()
1148 return False
1149 else:
1150 nosub = ("==== No Subprocess ====\n\n" +
1151 "WARNING: Running IDLE without a Subprocess is deprecated\n" +
1152 "and will be removed in a later version. See Help/IDLE Help\n" +
1153 "for details.\n\n")
1154 sys.displayhook = rpc.displayhook
1155
1156 self.write("Python %s on %s\n%s\n%s" %
1157 (sys.version, sys.platform, self.SPLASHLINE, nosub))
1158 self.text.focus_force()
1159 self.showprompt()
1160 # User code should use separate default Tk root window
1161 import tkinter
1162 tkinter._support_default_root = True
1163 tkinter._default_root = None
1164 return True
1165
1166 def stop_readline(self):
1167 if not self.reading: # no nested mainloop to exit.

Callers 2

setUpMethod · 0.45
open_shellMethod · 0.45

Calls 7

resetoutputMethod · 0.95
closeMethod · 0.95
writeMethod · 0.95
showpromptMethod · 0.95
start_subprocessMethod · 0.80
mark_setMethod · 0.45
focus_forceMethod · 0.45

Tested by 1

setUpMethod · 0.36