]> granicus.if.org Git - python/commitdiff
Marked keystrokes with the :kbd: role.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 12 Sep 2015 14:47:12 +0000 (17:47 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 12 Sep 2015 14:47:12 +0000 (17:47 +0300)
Fixed the case of the "Ctrl-" prefixes.

15 files changed:
Doc/faq/extending.rst
Doc/faq/windows.rst
Doc/library/idle.rst
Doc/library/multiprocessing.rst
Doc/library/signal.rst
Doc/library/ttk.rst
Doc/library/unittest.rst
Doc/tutorial/appendix.rst
Doc/tutorial/interpreter.rst
Doc/using/cmdline.rst
Doc/whatsnew/2.0.rst
Doc/whatsnew/2.5.rst
Doc/whatsnew/2.7.rst
Lib/test/test_os.py
Lib/unittest/main.py

index ccd8b285b2fc24c79474652b68050ff56a006dab..ade88ae4dd29d3b19098c0507e52781e6ed6ca46 100644 (file)
@@ -345,7 +345,7 @@ complete example using the GNU readline library (you may want to ignore
      {
        line = readline (prompt);
 
-       if (NULL == line)                          /* CTRL-D pressed */
+       if (NULL == line)                          /* Ctrl-D pressed */
        {
          done = 1;
        }
index 19bd12019ddeabb2d05682c413ec0f99918c6230..27299c88a70d25008cbf9d3dcb0da5752cfd0b30 100644 (file)
@@ -77,14 +77,14 @@ by entering a few expressions of your choice and seeing the results::
     'HelloHelloHello'
 
 Many people use the interactive mode as a convenient yet highly programmable
-calculator.  When you want to end your interactive Python session, hold the Ctrl
-key down while you enter a Z, then hit the "Enter" key to get back to your
+calculator.  When you want to end your interactive Python session, hold the :kbd:`Ctrl`
+key down while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get back to your
 Windows command prompt.
 
 You may also find that you have a Start-menu entry such as :menuselection:`Start
 --> Programs --> Python 2.7 --> Python (command line)` that results in you
 seeing the ``>>>`` prompt in a new window.  If so, the window will disappear
-after you enter the Ctrl-Z character; Windows is running a single "python"
+after you enter the :kbd:`Ctrl-Z` character; Windows is running a single "python"
 command in the window, and closes it when you terminate the interpreter.
 
 If the ``python`` command, instead of displaying the interpreter prompt ``>>>``,
@@ -127,8 +127,8 @@ you should make sure that entering the command ::
 
    c:\Python27\python
 
-starts up the interpreter as above (and don't forget you'll need a "CTRL-Z" and
-an "Enter" to get out of it). Once you have verified the directory, you can
+starts up the interpreter as above (and don't forget you'll need a ":kbd:`Ctrl-Z`" and
+an ":kbd:`Enter`" to get out of it). Once you have verified the directory, you can
 add it to the system path to make it easier to start Python by just running
 the ``python`` command. This is currently an option in the installer as of
 CPython 2.7.
@@ -321,7 +321,7 @@ Prior to Python 2.7 and 3.2, to terminate a process, you can use :mod:`ctypes`::
        return (0 != kernel32.TerminateProcess(handle, 0))
 
 In 2.7 and 3.2, :func:`os.kill` is implemented similar to the above function,
-with the additional feature of being able to send CTRL+C and CTRL+BREAK
+with the additional feature of being able to send :kbd:`Ctrl+C` and :kbd:`Ctrl+Break`
 to console subprocesses which are designed to handle those signals. See
 :func:`os.kill` for further details.
 
index e64f6831d92ae5ffaf967e1376c166db52dc03c1..ecc71156c9fb0935c45eb379dfbe15a2fbcd9256 100644 (file)
@@ -330,8 +330,8 @@ Go to file/line
 Editing and navigation
 ----------------------
 
-In this section, 'C' refers to the Control key on Windows and Unix and
-the Command key on Mac OSX.
+In this section, 'C' refers to the :kbd:`Control` key on Windows and Unix and
+the :kbd:`Command` key on Mac OSX.
 
 * :kbd:`Backspace` deletes to the left; :kbd:`Del` deletes to the right
 
index 021e3c8e18fb467f27adf143b1f3fc571355e4c1..e777937d144c7eec18cd79bae42b7f8782501865 100644 (file)
@@ -957,7 +957,7 @@ object -- see :ref:`multiprocessing-managers`.
 
 .. note::
 
-   If the SIGINT signal generated by Ctrl-C arrives while the main thread is
+   If the SIGINT signal generated by :kbd:`Ctrl-C` arrives while the main thread is
    blocked by a call to :meth:`BoundedSemaphore.acquire`, :meth:`Lock.acquire`,
    :meth:`RLock.acquire`, :meth:`Semaphore.acquire`, :meth:`Condition.acquire`
    or :meth:`Condition.wait` then the call will be immediately interrupted and
index 29d56fcea51c049918657c1c4530ba721d082bc9..fe7983b2d37dde0bd12f81f406220bff73c42c2b 100644 (file)
@@ -77,7 +77,7 @@ The variables defined in the :mod:`signal` module are:
 
 .. data:: CTRL_C_EVENT
 
-   The signal corresponding to the CTRL+C keystroke event. This signal can
+   The signal corresponding to the :kbd:`Ctrl+C` keystroke event. This signal can
    only be used with :func:`os.kill`.
 
    Availability: Windows.
@@ -87,7 +87,7 @@ The variables defined in the :mod:`signal` module are:
 
 .. data:: CTRL_BREAK_EVENT
 
-   The signal corresponding to the CTRL+BREAK keystroke event. This signal can
+   The signal corresponding to the :kbd:`Ctrl+Break` keystroke event. This signal can
    only be used with :func:`os.kill`.
 
    Availability: Windows.
index 6cab3e026c74ad18bfd0fbedc5b56df071db7e15..ad4aa9263496c500a5333224f81789c5604f7d38 100644 (file)
@@ -544,9 +544,9 @@ ttk.Notebook
       This will extend the bindings for the toplevel window containing the
       notebook as follows:
 
-      * Control-Tab: selects the tab following the currently selected one.
-      * Shift-Control-Tab: selects the tab preceding the currently selected one.
-      * Alt-K: where K is the mnemonic (underlined) character of any tab, will
+      * :kbd:`Control-Tab`: selects the tab following the currently selected one.
+      * :kbd:`Shift-Control-Tab`: selects the tab preceding the currently selected one.
+      * :kbd:`Alt-K`: where *K* is the mnemonic (underlined) character of any tab, will
         select that tab.
 
       Multiple notebooks in a single toplevel may be enabled for traversal,
index 41478f3ca04b8f048fa245145991217e360dcf78..5e3bd1c8b3569188a1a88ad5b6d734e7cc4172ca 100644 (file)
@@ -226,8 +226,8 @@ Command-line options
 
 .. cmdoption:: -c, --catch
 
-   Control-C during the test run waits for the current test to end and then
-   reports all the results so far. A second control-C raises the normal
+   :kbd:`Control-C` during the test run waits for the current test to end and then
+   reports all the results so far. A second :kbd:`Control-C` raises the normal
    :exc:`KeyboardInterrupt` exception.
 
    See `Signal Handling`_ for the functions that provide this functionality.
index befb96ae5d65c6849848aac12466bdc254db7196..7ab588bbfd585f68aa9607c5a6a43b944d62b799 100644 (file)
@@ -25,7 +25,7 @@ some cases of running out of memory.  All error messages are written to the
 standard error stream; normal output from executed commands is written to
 standard output.
 
-Typing the interrupt character (usually Control-C or DEL) to the primary or
+Typing the interrupt character (usually :kbd:`Control-C` or :kbd:`Delete`) to the primary or
 secondary prompt cancels the input and returns to the primary prompt. [#]_
 Typing an interrupt while a command is executing raises the
 :exc:`KeyboardInterrupt` exception, which may be handled by a :keyword:`try`
index 67f927fdf522c0c2df46a5c79defae4442d404f6..5f375048f0aae49b5c68b5f2b3eb1ed02021a7e1 100644 (file)
@@ -37,7 +37,7 @@ The interpreter's line-editing features usually aren't very sophisticated.  On
 Unix, whoever installed the interpreter may have enabled support for the GNU
 readline library, which adds more elaborate interactive editing and history
 features. Perhaps the quickest check to see whether command line editing is
-supported is typing Control-P to the first Python prompt you get.  If it beeps,
+supported is typing :kbd:`Control-P` to the first Python prompt you get.  If it beeps,
 you have command line editing; see Appendix :ref:`tut-interacting` for an
 introduction to the keys.  If nothing appears to happen, or if ``^P`` is echoed,
 command line editing isn't available; you'll only be able to use backspace to
index ce5e76fd4ceced5975bd96a4c52c4ba5d56035c6..3f314b7b3d497c69a542e01447f950f0dcceabc5 100644 (file)
@@ -41,7 +41,7 @@ additional methods of invocation:
 
 * When called with standard input connected to a tty device, it prompts for
   commands and executes them until an EOF (an end-of-file character, you can
-  produce that with *Ctrl-D* on UNIX or *Ctrl-Z, Enter* on Windows) is read.
+  produce that with :kbd:`Ctrl-D` on UNIX or :kbd:`Ctrl-Z, Enter` on Windows) is read.
 * When called with a file name argument or with a file as standard input, it
   reads and executes a script from that file.
 * When called with a directory name argument, it reads and executes an
index b6c4fb960d5bd7ae049d22f6a9b784ec3d1c20b9..67e1fc712306d8ba531a55db681f1ae11bf836a3 100644 (file)
@@ -1174,8 +1174,8 @@ partial list:
 
 * In the editor window, there is now a line/column bar at the bottom.
 
-* Three new keystroke commands: Check module (Alt-F5), Import module (F5) and
-  Run script (Ctrl-F5).
+* Three new keystroke commands: Check module (:kbd:`Alt-F5`), Import module (:kbd:`F5`) and
+  Run script (:kbd:`Ctrl-F5`).
 
 .. ======================================================================
 
index 9d2e124f56f3e5076a2d68a5a83bfa7740a7d9d1..b0c0af0f82429caaa103aa9da1914907240ec6a3 100644 (file)
@@ -827,7 +827,7 @@ inheritance relationships are::
 This rearrangement was done because people often want to catch all exceptions
 that indicate program errors.  :exc:`KeyboardInterrupt` and :exc:`SystemExit`
 aren't errors, though, and usually represent an explicit action such as the user
-hitting Control-C or code calling :func:`sys.exit`.  A bare ``except:`` will
+hitting :kbd:`Control-C` or code calling :func:`sys.exit`.  A bare ``except:`` will
 catch all exceptions, so you commonly need to list :exc:`KeyboardInterrupt` and
 :exc:`SystemExit` in order to re-raise them.  The usual pattern is::
 
index 65eaf17bcc41c07d4e2e2dd646fa3d4e17001037..f4e758932bb1c95e3a8cc96bd66e74c11529df35 100644 (file)
@@ -2320,7 +2320,7 @@ Port-Specific Changes: Windows
 * The :func:`os.kill` function now works on Windows.  The signal value
   can be the constants :const:`CTRL_C_EVENT`,
   :const:`CTRL_BREAK_EVENT`, or any integer.  The first two constants
-  will send Control-C and Control-Break keystroke events to
+  will send :kbd:`Control-C` and :kbd:`Control-Break` keystroke events to
   subprocesses; any other value will use the :c:func:`TerminateProcess`
   API.  (Contributed by Miki Tebeka; :issue:`1220212`.)
 
index 6c7ea7a58ec14363aa008711c8975b5ba79e93ea..57c7c8847c6c5c0924ae82055f8c70cbbd16399f 100644 (file)
@@ -856,7 +856,7 @@ class Win32KillTests(unittest.TestCase):
             os.kill(proc.pid, signal.SIGINT)
             self.fail("subprocess did not stop on {}".format(name))
 
-    @unittest.skip("subprocesses aren't inheriting CTRL+C property")
+    @unittest.skip("subprocesses aren't inheriting Ctrl+C property")
     def test_CTRL_C_EVENT(self):
         from ctypes import wintypes
         import ctypes
@@ -869,7 +869,7 @@ class Win32KillTests(unittest.TestCase):
         SetConsoleCtrlHandler.restype = wintypes.BOOL
 
         # Calling this with NULL and FALSE causes the calling process to
-        # handle CTRL+C, rather than ignore it. This property is inherited
+        # handle Ctrl+C, rather than ignore it. This property is inherited
         # by subprocesses.
         SetConsoleCtrlHandler(NULL, 0)
 
index b25367992de8ac7e004c906d9b6a104f83dffb80..ca99ac64173b3ada3735c82d09ef4a2bd6ae2495 100644 (file)
@@ -174,7 +174,7 @@ class TestProgram(object):
                               action='store_true')
         if self.catchbreak != False:
             parser.add_option('-c', '--catch', dest='catchbreak', default=False,
-                              help='Catch ctrl-C and display results so far',
+                              help='Catch Ctrl-C and display results so far',
                               action='store_true')
         if self.buffer != False:
             parser.add_option('-b', '--buffer', dest='buffer', default=False,