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

Julien Palard webhook-mailer at python.org
Fri Nov 23 09:35:11 EST 2018


https://github.com/python/cpython/commit/a1c40014085d5cc6c12064577e8c10e7182ee9f9
commit: a1c40014085d5cc6c12064577e8c10e7182ee9f9
branch: master
author: Mathieu Dupuy <deronnax at users.noreply.github.com>
committer: Julien Palard <julien at palard.fr>
date: 2018-11-23T15:35:07+01:00
summary:

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

That section is a tip on how to kill process on Windows for Python prior to 2.7 and 3.2.
3.1 end of support was April 2012 and 2.6 was October 2013, so that hasn't been need for supported versions of Python for more than 5 years. Beside not being needed anymore for a long time, when I read it with the eyes of a Python profane, it makes Python looks bad, like a language from the parts with warts you need to circumvent.
Let's delete that :)

files:
M Doc/faq/windows.rst

diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst
index d063e7c550c0..74aa52ab1a49 100644
--- a/Doc/faq/windows.rst
+++ b/Doc/faq/windows.rst
@@ -282,26 +282,6 @@ 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.
-
 How do I extract the downloaded documentation on Windows?
 ---------------------------------------------------------
 



More information about the Python-checkins mailing list