Skip to content

Commit a1c4001

Browse files
deronnaxJulienPalard
authored andcommitted
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 :)
1 parent 4ac5328 commit a1c4001

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Doc/faq/windows.rst

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -282,26 +282,6 @@ It defines a function ``kbhit()`` which checks whether a keyboard hit is
282282
present, and ``getch()`` which gets one character without echoing it.
283283

284284

285-
How do I emulate os.kill() in Windows?
286-
--------------------------------------
287-
288-
Prior to Python 2.7 and 3.2, to terminate a process, you can use :mod:`ctypes`:
289-
290-
.. code-block:: python
291-
292-
import ctypes
293-
294-
def kill(pid):
295-
"""kill function for Win32"""
296-
kernel32 = ctypes.windll.kernel32
297-
handle = kernel32.OpenProcess(1, 0, pid)
298-
return (0 != kernel32.TerminateProcess(handle, 0))
299-
300-
In 2.7 and 3.2, :func:`os.kill` is implemented similar to the above function,
301-
with the additional feature of being able to send :kbd:`Ctrl+C` and :kbd:`Ctrl+Break`
302-
to console subprocesses which are designed to handle those signals. See
303-
:func:`os.kill` for further details.
304-
305285
How do I extract the downloaded documentation on Windows?
306286
---------------------------------------------------------
307287

0 commit comments

Comments
 (0)