Lines Matching +full:python3 +full:- +full:docutils
6 <meta charset="utf-8" />
7 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
12 …<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"><…
37 table.full-width-table {
52 <div class="related" role="navigation" aria-label="related navigation">
55 <li class="right" style="margin-right: 10px">
59 <a href="../py-modindex.html" title="Python Module Index"
69 style="vertical-align: middle; margin-top: -1px"/></li>
73 <li id="cpython-language-and-version">
77 … <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
78 …<li class="nav-item nav-item-2"><a href="tk.html" accesskey="U">Graphical User Interfaces with Tk<…
79 <li class="nav-item nav-item-this"><a href="">IDLE</a></li>
83 <div class="inline-search" style="display: none" role="search">
84 <form class="inline-search" action="../search.html" method="get">
91 <script type="text/javascript">$('.inline-search').show(0);</script>
106 <hr class="docutils" id="index-0" />
110 …"tkinter.html#module-tkinter" title="tkinter: Interface to Tcl/Tk for graphical user interfaces"><…
111 <li><p>cross-platform: works mostly the same on Windows, Unix, and macOS</p></li>
114 <li><p>multi-window text editor with multiple undo, Python colorizing,
134 <div class="section" id="file-menu-shell-and-editor">
135 <h3>File menu (Shell and Editor)<a class="headerlink" href="#file-menu-shell-and-editor" title="Per…
146 <dl class="simple" id="index-1">
167 …ution). Calling <code class="docutils literal notranslate"><span class="pre">exit()</span></code>…
174 <div class="section" id="edit-menu-shell-and-editor">
175 <h3>Edit menu (Shell and Editor)<a class="headerlink" href="#edit-menu-shell-and-editor" title="Per…
182 <dt>Cut</dt><dd><p>Copy selection into the system-wide clipboard; then delete the selection.</p>
184 <dt>Copy</dt><dd><p>Copy selection into the system-wide clipboard.</p>
186 <dt>Paste</dt><dd><p>Insert contents of the system-wide clipboard into the current window.</p>
201 <dt>Replace…</dt><dd><p>Open a search-and-replace dialog.</p>
208 <a class="reference internal" href="#completions"><span class="std std-ref">Completions</span></a> …
214 function parameter hints. See <a class="reference internal" href="#calltips"><span class="std std-…
221 <div class="section" id="format-menu-editor-window-only">
222 <span id="format-menu"></span><h3>Format menu (Editor window only)<a class="headerlink" href="#form…
242 <dt>Format Paragraph</dt><dd><p>Reformat the current blank-line-delimited paragraph in comment bloc…
247 non-whitespace character of a line by applying str.rstrip to each line,
253 <div class="section" id="run-menu-editor-window-only">
254 <span id="index-2"></span><h3>Run menu (Editor window only)<a class="headerlink" href="#run-menu-ed…
255 <dl class="simple" id="run-module">
256 …dule</dt><dd><p>Do <a class="reference internal" href="#check-module"><span class="std std-ref">Ch…
258 … requires use of <code class="docutils literal notranslate"><span class="pre">print</span></code> …
261 … executing a file with <code class="docutils literal notranslate"><span class="pre">python</span> …
265 <dl class="simple" id="run-custom">
266 …d</dt><dd><p>Same as <a class="reference internal" href="#run-module"><span class="std std-ref">Ru…
267 …al" href="sys.html#sys.argv" title="sys.argv"><code class="xref py py-data docutils literal notran…
271 <dl class="simple" id="check-module">
279 <dl class="simple" id="python-shell">
284 <div class="section" id="shell-menu-shell-window-only">
285 <h3>Shell menu (Shell window only)<a class="headerlink" href="#shell-menu-shell-window-only" title=…
299 <div class="section" id="debug-menu-shell-window-only">
300 <h3>Debug menu (Shell window only)<a class="headerlink" href="#debug-menu-shell-window-only" title=…
309 <dl class="simple" id="index-3">
317 <dt>Auto-open Stack Viewer</dt><dd><p>Toggle automatically opening the stack viewer on an unhandled…
321 <div class="section" id="options-menu-shell-and-editor">
322 <h3>Options menu (Shell and Editor)<a class="headerlink" href="#options-menu-shell-and-editor" titl…
329 <a class="reference internal" href="#preferences"><span class="std std-ref">Setting preferences</sp…
337 <a class="reference internal" href="#code-context"><span class="std std-ref">Code Context</span></a…
342 preferences (see <a class="reference internal" href="#preferences"><span class="std std-ref">Settin…
353 <div class="section" id="window-menu-shell-and-editor">
354 <h3>Window menu (Shell and Editor)<a class="headerlink" href="#window-menu-shell-and-editor" title=…
358 <div class="section" id="help-menu-shell-and-editor">
359 <h3>Help menu (Shell and Editor)<a class="headerlink" href="#help-menu-shell-and-editor" title="Per…
373 the General tab. See the <a class="reference internal" href="#help-sources"><span class="std std-re…
376 <div class="section" id="context-menus">
377 <span id="index-4"></span><h3>Context Menus<a class="headerlink" href="#context-menus" title="Perma…
378 <p>Open a context menu by right-clicking in a window (Control-click on macOS).
381 <dt>Cut</dt><dd><p>Copy selection into the system-wide clipboard; then delete the selection.</p>
383 <dt>Copy</dt><dd><p>Copy selection into the system-wide clipboard.</p>
385 <dt>Paste</dt><dd><p>Insert contents of the system-wide clipboard into the current window.</p>
390 debugger. Breakpoints for a file are saved in the user’s <code class="docutils literal notranslate…
412 <div class="section" id="editing-and-navigation">
413 <span id="id2"></span><h2>Editing and navigation<a class="headerlink" href="#editing-and-navigation…
414 <div class="section" id="editor-windows">
415 <h3>Editor windows<a class="headerlink" href="#editor-windows" title="Permalink to this headline">¶…
426 <div class="section" id="key-bindings">
427 <h3>Key bindings<a class="headerlink" href="#key-bindings" title="Permalink to this headline">¶</a>…
428 <p>In this section, ‘C’ refers to the <kbd class="kbd docutils literal notranslate">Control</kbd> k…
429 the <kbd class="kbd docutils literal notranslate">Command</kbd> key on macOS.</p>
431 <li><p><kbd class="kbd docutils literal notranslate">Backspace</kbd> deletes to the left; <kbd clas…
432 …docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kb…
433 …docutils literal notranslate"><kbd class="kbd docutils literal notranslate">Page</kbd> <kbd class=…
434 …docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kb…
435 <li><p><kbd class="kbd docutils literal notranslate">Home</kbd>/<kbd class="kbd docutils literal no…
436 …docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kb…
440 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
441 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
442 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
443 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
444 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
446 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
448 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
450 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
455 …docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kb…
458 <div class="section" id="automatic-indentation">
459 <h3>Automatic indentation<a class="headerlink" href="#automatic-indentation" title="Permalink to th…
460 <p>After a block-opening statement, the next line is indented by 4 spaces (in the
462 the next line is dedented. In leading indentation, <kbd class="kbd docutils literal notranslate">B…
463 to 4 spaces if they are there. <kbd class="kbd docutils literal notranslate">Tab</kbd> inserts spac…
467 <a class="reference internal" href="#format-menu"><span class="std std-ref">Format menu</span></a>.…
476 …ting characters; by hitting <kbd class="kbd docutils literal notranslate">Up</kbd>, <kbd class="kb…
477 …docutils literal notranslate">PageUp</kbd>, <kbd class="kbd docutils literal notranslate">PageDown…
478 and by a single click within the box. Close the box with <kbd class="kbd docutils literal notransl…
479 <kbd class="kbd docutils literal notranslate">Enter</kbd>, and double <kbd class="kbd docutils lite…
486 …nternal" href="os.html#os.sep" title="os.sep"><code class="xref py py-data docutils literal notran…
487 …l" href="os.html#os.altsep" title="os.altsep"><code class="xref py py-data docutils literal notran…
492 …ey is <kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
497 <p>Hitting <kbd class="kbd docutils literal notranslate">Tab</kbd> after a prefix usually has the s…
501 <p>Invoking ‘Show Completions’, or hitting <kbd class="kbd docutils literal notranslate">Tab</kbd> …
503 keywords, builtin names, and available module-level names.</p>
505 available module-level names by running your code
515 <p>A calltip is shown automatically when one types <kbd class="kbd docutils literal notranslate">(<…
518 is moved out of the argument area, or <kbd class="kbd docutils literal notranslate">)</kbd> is type…
522 the latter’s first blank line or the fifth non-blank line. (Some builtin
529 <p>For example, restart the Shell and enter <code class="docutils literal notranslate"><span class=…
531 use. (This could change.) Enter <code class="docutils literal notranslate"><span class="pre">turt…
533 … class="docutils literal notranslate"><span class="pre">import</span> <span class="pre">turtle</sp…
539 <div class="section" id="code-context">
540 <span id="id5"></span><h3>Code Context<a class="headerlink" href="#code-context" title="Permalink t…
544 …docutils literal notranslate"><span class="pre">class</span></code>, <code class="docutils literal…
554 <div class="section" id="python-shell-window">
555 <h3>Python Shell window<a class="headerlink" href="#python-shell-window" title="Permalink to this h…
559 until one hits <kbd class="kbd docutils literal notranslate">Return</kbd>. One may edit pasted cod…
561 …ceptions.html#SyntaxError" title="SyntaxError"><code class="xref py py-exc docutils literal notran…
565 …li><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
566 …docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kb…
567 …i><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">A…
570 …i><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">A…
571 …S use <kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">…
572 …docutils literal notranslate"><kbd class="kbd docutils literal notranslate">Alt</kbd>-<kbd class="…
573 <li><p><kbd class="kbd docutils literal notranslate">Return</kbd> while on any previous command ret…
578 <div class="section" id="text-colors">
579 <h3>Text colors<a class="headerlink" href="#text-colors" title="Permalink to this headline">¶</a></…
583 keywords, builtin class and function names, names following <code class="docutils literal notransla…
584 <code class="docutils literal notranslate"><span class="pre">def</span></code>, strings, and commen…
586 …-keywords"><span class="std std-ref">soft keywords</span></a> <a class="reference internal" href="…
587 …-keyword docutils literal notranslate"><span class="pre">case</span></code></a>, and <a class="ref…
588 pattern-matching statements. However, this highlighting is not perfect and
589 …s, including some <code class="docutils literal notranslate"><span class="pre">_</span></code>-s i…
594 text in popups and dialogs is not user-configurable.</p>
597 <div class="section" id="startup-and-code-execution">
598 <h2>Startup and code execution<a class="headerlink" href="#startup-and-code-execution" title="Perma…
599 <p>Upon startup with the <code class="docutils literal notranslate"><span class="pre">-s</span></co…
600 …-5"></span><code class="xref std std-envvar docutils literal notranslate"><span class="pre">IDLEST…
601 …st checks for <code class="docutils literal notranslate"><span class="pre">IDLESTARTUP</span></cod…
602 referenced is run. If <code class="docutils literal notranslate"><span class="pre">IDLESTARTUP</sp…
603 <code class="docutils literal notranslate"><span class="pre">PYTHONSTARTUP</span></code>. Files re…
606 <p>In addition, <code class="docutils literal notranslate"><span class="pre">Tk</span></code> also …
607 Tk file is loaded unconditionally. This additional file is <code class="docutils literal notransla…
611 <div class="section" id="command-line-usage">
612 <h3>Command line usage<a class="headerlink" href="#command-line-usage" title="Permalink to this hea…
613 …s="highlight-none notranslate"><div class="highlight"><pre><span></span>idle.py [-c command] [-d] …
615 -c command run command in the shell window
616 -d enable debugger and open shell window
617 -e open editor window
618 -h print help message with legal combinations and exit
619 -i open shell window
620 -r file run file in shell window
621 -s run $IDLESTARTUP or $PYTHONSTARTUP first, in shell window
622 -t title set title of shell window
623 - run stdin in shell (- must be last option before args)
628 …docutils literal notranslate"><span class="pre">-</span></code>, <code class="docutils literal not…
629 …docutils literal notranslate"><span class="pre">sys.argv[1:...]</span></code> and <code class="doc…
630 or <code class="docutils literal notranslate"><span class="pre">'-r'</span></code>. No editor wind…
633 <code class="docutils literal notranslate"><span class="pre">sys.argv</span></code> reflects the ar…
636 <div class="section" id="startup-failure">
637 <h3>Startup failure<a class="headerlink" href="#startup-failure" title="Permalink to this headline"…
642 usually displays a <code class="docutils literal notranslate"><span class="pre">Tk</span></code> er…
647 with <code class="docutils literal notranslate"><span class="pre">**</span> <span class="pre">Inval…
648 The valid value is <code class="docutils literal notranslate"><span class="pre">127.0.0.1</span> <s…
649 …ne can diagnose with <code class="docutils literal notranslate"><span class="pre">tcpconnect</span…
650 terminal window and <code class="docutils literal notranslate"><span class="pre">tcplisten</span> <…
651 <p>A common cause of failure is a user-written file with the same name as a
660 ports. A similar problem is a network mis-configuration that blocks
668 initiated by a program crash or Keyboard Interrupt (control-C) may fail
672 <code class="docutils literal notranslate"><span class="pre">~/.idlerc/</span></code> (~ is one’s h…
679 …a console or terminal (<code class="docutils literal notranslate"><span class="pre">python</span> …
681 <p>On Unix-based systems with tcl/tk older than <code class="docutils literal notranslate"><span cl…
682 <code class="docutils literal notranslate"><span class="pre">About</span> <span class="pre">IDLE</s…
686 then re-configure IDLE to use a font that works better.</p>
688 <div class="section" id="running-user-code">
689 <h3>Running user code<a class="headerlink" href="#running-user-code" title="Permalink to this headl…
692 directly with Python in a text-mode system console or terminal window.
694 visible results. For instance, <code class="docutils literal notranslate"><span class="pre">sys.mo…
695 and <code class="docutils literal notranslate"><span class="pre">threading.active_count()</span></c…
698 …docutils literal notranslate"><span class="pre">sys.stdin</span></code>, <code class="docutils lit…
700 …ues stored in <code class="docutils literal notranslate"><span class="pre">sys.__stdin__</span></c…
701 <code class="docutils literal notranslate"><span class="pre">sys.__stderr__</span></code> are not t…
709 …ref="stdtypes.html#str.join" title="str.join"><code class="xref py py-meth docutils literal notran…
712 modules such as multiprocessing. If such subprocess use <code class="docutils literal notranslate"…
713 sys.stdin or <code class="docutils literal notranslate"><span class="pre">print</span></code> or <c…
716 …f <code class="docutils literal notranslate"><span class="pre">sys</span></code> is reset by user …
721 and screen will not work. These include system-specific functions that
724 that would not be there otherwise. IDLE wraps <code class="docutils literal notranslate"><span cla…
725 <code class="docutils literal notranslate"><span class="pre">sys.setrecursionlimit</span></code> to…
730 <div class="section" id="user-output-in-shell">
731 <h3>User output in Shell<a class="headerlink" href="#user-output-in-shell" title="Permalink to this…
733 corresponding output device. When IDLE executes user code, <code class="docutils literal notransla…
734 and <code class="docutils literal notranslate"><span class="pre">sys.stderr</span></code> are conne…
741 A Windows console, for instance, keeps a user-settable 1 to 9999 lines,
752 <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp…
761 <p>The <code class="docutils literal notranslate"><span class="pre">repr</span></code> function is …
763 control codes, some BMP codepoints, and all non-BMP codepoints are
780 <p>Squeezed output is expanded in place by double-clicking the label.
782 right-clicking the label.</p>
784 <div class="section" id="developing-tkinter-applications">
785 <h3>Developing tkinter applications<a class="headerlink" href="#developing-tkinter-applications" ti…
787 facilitate development of tkinter programs. Enter <code class="docutils literal notranslate"><span…
790 <code class="docutils literal notranslate"><span class="pre">root.update()</span></code> to see the…
792 Next enter <code class="docutils literal notranslate"><span class="pre">b</span> <span class="pre">…
793 nothing visibly changes in standard Python until one enters <code class="docutils literal notransla…
794 <p>Most tkinter programs run <code class="docutils literal notranslate"><span class="pre">root.main…
796 …ss="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-i</span></cod…
797 appear until <code class="docutils literal notranslate"><span class="pre">mainloop()</span></code> …
802 re-enable the mainloop call when running in standard Python.</p>
804 <div class="section" id="running-without-a-subprocess">
805 <h3>Running without a subprocess<a class="headerlink" href="#running-without-a-subprocess" title="P…
814 the -n command line switch.</p>
815 <p>If IDLE is started with the -n command line switch it will run in a
822 re-import any specific items (e.g. from foo import baz) if the changes
830 <div class="section" id="help-and-preferences">
831 <h2>Help and preferences<a class="headerlink" href="#help-and-preferences" title="Permalink to this…
832 <div class="section" id="help-sources">
833 <span id="id6"></span><h3>Help sources<a class="headerlink" href="#help-sources" title="Permalink t…
835 IDLE chapter of the Library Reference. The result, in a read-only
842 including tutorials, available at <code class="docutils literal notranslate"><span class="pre">docs…
844 has an off-line copy of the docs (this may be an installation option),
849 <div class="section" id="setting-preferences">
850 <span id="preferences"></span><h3>Setting preferences<a class="headerlink" href="#setting-preferenc…
853 Non-default user settings are saved in a <code class="docutils literal notranslate"><span class="pr…
855 by editing or deleting one or more of the files in <code class="docutils literal notranslate"><span…
862 <p>On the Highlights and Keys tab, select a built-in or custom color theme
863 and key set. To use a newer built-in color theme or key set with older
867 <div class="section" id="idle-on-macos">
868 <h3>IDLE on macOS<a class="headerlink" href="#idle-on-macos" title="Permalink to this headline">¶</…
877 beginning of config-extensions.def in the idlelib directory for further
889 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
895 <li><a class="reference internal" href="#file-menu-shell-and-editor">File menu (Shell and Editor)</…
896 <li><a class="reference internal" href="#edit-menu-shell-and-editor">Edit menu (Shell and Editor)</…
897 <li><a class="reference internal" href="#format-menu-editor-window-only">Format menu (Editor window…
898 <li><a class="reference internal" href="#run-menu-editor-window-only">Run menu (Editor window only)…
899 <li><a class="reference internal" href="#shell-menu-shell-window-only">Shell menu (Shell window onl…
900 <li><a class="reference internal" href="#debug-menu-shell-window-only">Debug menu (Shell window onl…
901 <li><a class="reference internal" href="#options-menu-shell-and-editor">Options menu (Shell and Edi…
902 <li><a class="reference internal" href="#window-menu-shell-and-editor">Window menu (Shell and Edito…
903 <li><a class="reference internal" href="#help-menu-shell-and-editor">Help menu (Shell and Editor)</…
904 <li><a class="reference internal" href="#context-menus">Context Menus</a></li>
907 <li><a class="reference internal" href="#editing-and-navigation">Editing and navigation</a><ul>
908 <li><a class="reference internal" href="#editor-windows">Editor windows</a></li>
909 <li><a class="reference internal" href="#key-bindings">Key bindings</a></li>
910 <li><a class="reference internal" href="#automatic-indentation">Automatic indentation</a></li>
913 <li><a class="reference internal" href="#code-context">Code Context</a></li>
914 <li><a class="reference internal" href="#python-shell-window">Python Shell window</a></li>
915 <li><a class="reference internal" href="#text-colors">Text colors</a></li>
918 <li><a class="reference internal" href="#startup-and-code-execution">Startup and code execution</a>…
919 <li><a class="reference internal" href="#command-line-usage">Command line usage</a></li>
920 <li><a class="reference internal" href="#startup-failure">Startup failure</a></li>
921 <li><a class="reference internal" href="#running-user-code">Running user code</a></li>
922 <li><a class="reference internal" href="#user-output-in-shell">User output in Shell</a></li>
923 <li><a class="reference internal" href="#developing-tkinter-applications">Developing tkinter applic…
924 <li><a class="reference internal" href="#running-without-a-subprocess">Running without a subprocess…
927 <li><a class="reference internal" href="#help-and-preferences">Help and preferences</a><ul>
928 <li><a class="reference internal" href="#help-sources">Help sources</a></li>
929 <li><a class="reference internal" href="#setting-preferences">Setting preferences</a></li>
930 <li><a class="reference internal" href="#idle-on-macos">IDLE on macOS</a></li>
940 …title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pr…
944 <div role="note" aria-label="source link">
946 <ul class="this-page-menu">
959 <div class="related" role="navigation" aria-label="related navigation">
962 <li class="right" style="margin-right: 10px">
966 <a href="../py-modindex.html" title="Python Module Index"
976 style="vertical-align: middle; margin-top: -1px"/></li>
980 <li id="cpython-language-and-version">
984 … <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
985 …<li class="nav-item nav-item-2"><a href="tk.html" >Graphical User Interfaces with Tk</a> »</l…
986 <li class="nav-item nav-item-this"><a href="">IDLE</a></li>
990 <div class="inline-search" style="display: none" role="search">
991 <form class="inline-search" action="../search.html" method="get">
998 <script type="text/javascript">$('.inline-search').show(0);</script>
1005 © <a href="../copyright.html">Copyright</a> 2001-2022, Python Software Foundation.
1008 The Python Software Foundation is a non-profit corporation.
1017 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.