Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b73676

Browse files
committed
Issue #15308: Add 'interrupt execution' (^C) to Shell menu.
Patch by Roger Serwy, updated by Bayard Randel.
1 parent ed6224e commit 4b73676

4 files changed

Lines changed: 52 additions & 26 deletions

File tree

Doc/library/idle.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ View Last Restart
226226
Restart Shell
227227
Restart the shell to clean the environment.
228228

229+
Interrupt Execution
230+
Stop a running program.
231+
229232
Debug menu (Shell window only)
230233
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
231234

Lib/idlelib/Bindings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
('shell', [
7070
('_View Last Restart', '<<view-restart>>'),
7171
('_Restart Shell', '<<restart-shell>>'),
72+
None,
73+
('_Interrupt Execution', '<<interrupt-execution>>'),
7274
]),
7375
('debug', [
7476
('_Go to File/Line', '<<goto-file-line>>'),

Lib/idlelib/README.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,15 @@ Edit
161161
Show surrounding parens # ParenMatch (& Hyperparser)
162162

163163
Shell # PyShell
164-
View Last Restart # PyShell.?
165-
Restart Shell # PyShell.?
164+
View Last Restart # PyShell.PyShell.view_restart_mark
165+
Restart Shell # PyShell.PyShell.restart_shell
166+
Interrupt Execution # pyshell.PyShell.cancel_callback
166167

167168
Debug (Shell only)
168169
Go to File/Line
169-
Debugger # Debugger, RemoteDebugger
170-
Stack Viewer # StackViewer
171-
Auto-open Stack Viewer # StackViewer
170+
Debugger # Debugger, RemoteDebugger, PyShell.toggle_debuger
171+
Stack Viewer # StackViewer, PyShell.open_stack_viewer
172+
Auto-open Stack Viewer # StackViewer
172173

173174
Format (Editor only)
174175
Indent Region

Lib/idlelib/help.html

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ <h3>Navigation</h3>
6565

6666
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
6767
<li class="nav-item nav-item-2"><a href="tk.html" accesskey="U">25. Graphical User Interfaces with Tk</a> &raquo;</li>
68+
<li class="right">
69+
70+
71+
<div class="inline-search" style="display: none" role="search">
72+
<form class="inline-search" action="../search.html" method="get">
73+
<input placeholder="Quick search" type="text" name="q" />
74+
<input type="submit" value="Go" />
75+
<input type="hidden" name="check_keywords" value="yes" />
76+
<input type="hidden" name="area" value="default" />
77+
</form>
78+
</div>
79+
<script type="text/javascript">$('.inline-search').show(0);</script>
80+
|
81+
</li>
82+
6883
</ul>
6984
</div>
7085

@@ -240,6 +255,8 @@ <h3>25.5.1.5. Shell menu (Shell window only)<a class="headerlink" href="#shell-m
240255
<dd>Scroll the shell window to the last Shell restart.</dd>
241256
<dt>Restart Shell</dt>
242257
<dd>Restart the shell to clean the environment.</dd>
258+
<dt>Interrupt Execution</dt>
259+
<dd>Stop a running program.</dd>
243260
</dl>
244261
</div>
245262
<div class="section" id="debug-menu-shell-window-only">
@@ -649,26 +666,14 @@ <h4>Previous topic</h4>
649666
<h4>Next topic</h4>
650667
<p class="topless"><a href="othergui.html"
651668
title="next chapter">25.6. Other Graphical User Interface Packages</a></p>
652-
<h3>This Page</h3>
653-
<ul class="this-page-menu">
654-
<li><a href="../bugs.html">Report a Bug</a></li>
655-
<li><a href="../_sources/library/idle.txt"
656-
rel="nofollow">Show Source</a></li>
657-
</ul>
658-
659-
<div id="searchbox" style="display: none" role="search">
660-
<h3>Quick search</h3>
661-
<form class="search" action="../search.html" method="get">
662-
<input type="text" name="q" />
663-
<input type="submit" value="Go" />
664-
<input type="hidden" name="check_keywords" value="yes" />
665-
<input type="hidden" name="area" value="default" />
666-
</form>
667-
<p class="searchtip" style="font-size: 90%">
668-
Enter search terms or a module, class or function name.
669-
</p>
670-
</div>
671-
<script type="text/javascript">$('#searchbox').show(0);</script>
669+
<div role="note" aria-label="source link">
670+
<h3>This Page</h3>
671+
<ul class="this-page-menu">
672+
<li><a href="../bugs.html">Report a Bug</a></li>
673+
<li><a href="../_sources/library/idle.txt"
674+
rel="nofollow">Show Source</a></li>
675+
</ul>
676+
</div>
672677
</div>
673678
</div>
674679
<div class="clearer"></div>
@@ -697,6 +702,21 @@ <h3>Navigation</h3>
697702

698703
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
699704
<li class="nav-item nav-item-2"><a href="tk.html" >25. Graphical User Interfaces with Tk</a> &raquo;</li>
705+
<li class="right">
706+
707+
708+
<div class="inline-search" style="display: none" role="search">
709+
<form class="inline-search" action="../search.html" method="get">
710+
<input placeholder="Quick search" type="text" name="q" />
711+
<input type="submit" value="Go" />
712+
<input type="hidden" name="check_keywords" value="yes" />
713+
<input type="hidden" name="area" value="default" />
714+
</form>
715+
</div>
716+
<script type="text/javascript">$('.inline-search').show(0);</script>
717+
|
718+
</li>
719+
700720
</ul>
701721
</div>
702722
<div class="footer">
@@ -705,7 +725,7 @@ <h3>Navigation</h3>
705725
The Python Software Foundation is a non-profit corporation.
706726
<a href="https://www.python.org/psf/donations/">Please donate.</a>
707727
<br />
708-
Last updated on Aug 30, 2016.
728+
Last updated on Sep 12, 2016.
709729
<a href="../bugs.html">Found a bug</a>?
710730
<br />
711731
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.6.

0 commit comments

Comments
 (0)