MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / begin

Method begin

tools/python-3.11.9-amd64/Lib/idlelib/pyshell.py:1143–1167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers 1

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

no test coverage detected