Lines Matching +full:python3 +full:- +full:paste
1 #! /usr/bin/env python3
15 # https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx
69 try: # In case IDLE started with -n.
70 eof = 'Ctrl-D (end-of-file)'
73 except NameError: # In case python started with -S.
84 """Show Idle-format warning (after replacing warnings.showwarning).
88 and the output of a hard-coded prompt.
130 if key[:1] + key[-1:] == '<>':
145 self.text.bind("<<set-breakpoint-here>>", self.set_breakpoint_here)
146 self.text.bind("<<clear-breakpoint-here>>", self.clear_breakpoint_here)
147 self.text.bind("<<open-python-shell>>", self.flist.open_shell)
165 ("Paste", "<<paste>>", "rmenu_check_paste"),
167 ("Set Breakpoint", "<<set-breakpoint-here>>", None),
168 ("Clear Breakpoint", "<<clear-breakpoint-here>>", None)
245 # needs to be re-verified, since the breaks at the time the
318 # "Extend base method - clear breaks if module is modified"
324 "Extend base method - clear breaks when module is closed"
383 # Temporarily monkey-patch the delegate's .insert() method to
384 # always use the "stdin" tag. This is needed for undo-ing
407 "Override the base class - just re-raise EOFError"
410 def restart_line(width, filename): # See bpo-38141.
418 div, mod = divmod((width -len(tag)), 2)
421 return tag[:-2] # Remove ' ='.
447 w = ['-W' + s for s in sys.warnoptions]
451 del_exitf = idleConf.GetOption('main', 'General', 'delete-exitfunc',
454 return [sys.executable] + w + ["-c", command, str(self.port)]
526 console.text.delete("iomark", "end-1c")
529 console.text.mark_set("restart", "end-1c")
614 if self.tkconsole.getvar("<<toggle-jit-stack-viewer>>"):
741 pos = "iomark + %d chars" % (offset-1)
744 (lineno-1, offset-1)
755 if self.tkconsole.getvar("<<toggle-jit-stack-viewer>>"):
761 if key[:1] + key[-1:] != "<>":
832 "Run IDLE with the -n command line switch to start without a "
842 "https://docs.python.org/3/library/idle.html#startup-failure",
872 # Extend right-click context menu
874 ("Squeeze", "<<squeeze-current-text>>"),
880 "<<copy-with-prompts>>",
912 self.prompt_last_line = self.sys_ps1.split('\n')[-1]
917 text.bind("<<newline-and-indent>>", self.enter_callback)
918 text.bind("<<plain-newline-and-indent>>", self.linefeed_callback)
919 text.bind("<<interrupt-execution>>", self.cancel_callback)
920 text.bind("<<end-of-file>>", self.eof_callback)
921 text.bind("<<open-stack-viewer>>", self.open_stack_viewer)
922 text.bind("<<toggle-debugger>>", self.toggle_debugger)
923 text.bind("<<toggle-jit-stack-viewer>>", self.toggle_jit_stack_viewer)
924 text.bind("<<copy-with-prompts>>", self.copy_with_prompts_callback)
926 text.bind("<<view-restart>>", self.view_restart_mark)
927 text.bind("<<restart-shell>>", self.restart_shell)
929 text.bind("<<squeeze-current-text>>",
1001 This makes the copied text useful for doc-tests and interactive
1064 self.setvar("<<toggle-debugger>>", not not db)
1192 line = self.text.get("iomark", "end-1c")
1193 if len(line) == 0: # may be EOF if we quit our mainloop with Ctrl-C
1211 return # Active selection -- always use default binding
1234 self.text.compare("insert", "==", "end-1c")):
1271 # Check if there's a relevant stdin range -- if so, use it.
1297 # No stdin mark -- just get the current line, less any prompt
1311 s = self.text.get("insert", "end-1c")
1313 self.text.delete("insert", "end-1c")
1316 if self.text.compare("insert", "<", "end-1c linestart"):
1320 self.text.mark_set("insert", "end-1c")
1341 self.text.mark_set("insert", "end-1c")
1363 index_before = self.text.index("end-2c")
1364 line = self.text.get("iomark", "end-1c")
1393 "Callback for Run/Restart Shell Cntl-F6"
1401 prompt = prompt[:-len(self.sys_ps1)]
1402 self.text.tag_add("console", "iomark-1c")
1406 self.text.mark_set("insert", "end-1c")
1419 source = self.text.get("iomark", "end-1c")
1422 if self.text.get("end-2c") != "\n":
1423 self.text.insert("end-1c", "\n")
1424 self.text.mark_set("iomark", "end-1c")
1464 "Make paste replace selection on x11. See issue #5124."
1469 '<<Paste>>',
1471 root.bind_class(cls, '<<Paste>>'))
1476 USAGE: idle [-deins] [-t title] [file]*
1477 idle [-dns] [-t title] (-c cmd | -r file) [arg]*
1478 idle [-dns] [-t title] - [arg]*
1480 -h print this help message and exit
1481 -n run IDLE without a subprocess (DEPRECATED,
1486 -e open an edit window
1487 -i open a shell window
1489 The following options imply -i and will open a shell:
1491 -c cmd run the command in a shell, or
1492 -r file run script from file
1494 -d enable the debugger
1495 -s run $IDLESTARTUP or $PYTHONSTARTUP before anything else
1496 -t title set title of shell window
1498 A default edit window will be bypassed when -c, -r, or - are used.
1500 [arg]* are passed to the command (-c) or script (-r) in sys.argv[1:].
1510 idle -est "Baz" foo.py
1514 idle -c "import sys; print(sys.argv)" "foo"
1515 Open a shell window and run the command, passing "-c" in sys.argv[0]
1518 idle -d -s -r foo.py "Hello World"
1523 echo "import sys; print(sys.argv)" | idle - "foobar"
1550 if o == '-c':
1553 if o == '-d':
1556 if o == '-e':
1558 if o == '-h':
1561 if o == '-i':
1563 if o == '-n':
1567 if o == '-r':
1575 if o == '-s':
1578 if o == '-t':
1581 if args and args[0] == '-':
1587 if args and args[0] == '-':
1590 sys.argv = ['-c'] + args
1608 'editor-on-startup', type='bool')
1659 # On OSX: when the user has double-clicked on a file that causes