[Python-checkins] [3.7] Doc: Delete "how do I emulate os.kill" section in Windows FAQ (GH-10487) (GH-10767)

Miss Islington (bot) webhook-mailer at python.org
Wed Nov 28 10:53:27 EST 2018

commit: 9c16bc2c3d5f0fd892a122b2f44aef445ee3381d
branch: 3.7
author: Julien Palard <julien at palard.fr>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2018-11-28T07:53:23-08:00

[3.7] Doc: Delete "how do I emulate os.kill" section in Windows FAQ (GH-10487) (GH-10767)

M Doc/faq/windows.rst

diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst
index 9292a2407a75..a46d4c1725ac 100644
--- a/Doc/faq/windows.rst
+++ b/Doc/faq/windows.rst
@@ -280,24 +280,3 @@ How do I check for a keypress without blocking?
 Use the msvcrt module.  This is a standard Windows-specific extension module.
 It defines a function ``kbhit()`` which checks whether a keyboard hit is
 present, and ``getch()`` which gets one character without echoing it.
-How do I emulate os.kill() in Windows?
-Prior to Python 2.7 and 3.2, to terminate a process, you can use :mod:`ctypes`:
-.. code-block:: python
-   import ctypes
-   def kill(pid):
-       """kill function for Win32"""
-       kernel32 = ctypes.windll.kernel32
-       handle = kernel32.OpenProcess(1, 0, pid)
-       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 :kbd:`Ctrl+C` and :kbd:`Ctrl+Break`
-to console subprocesses which are designed to handle those signals. See
-:func:`os.kill` for further details.

More information about the Python-checkins mailing list