| 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. |