revert r69777 since all the experts agree that extra import lines distract from the code
diff --git a/Doc/library/sunaudio.rst b/Doc/library/sunaudio.rst
index 4908cb4..4d67b21 100644
--- a/Doc/library/sunaudio.rst
+++ b/Doc/library/sunaudio.rst
@@ -135,13 +135,11 @@
The audio device supports asynchronous notification of various events, through
the SIGPOLL signal. Here's an example of how you might enable this in Python::
- import fcntl
- import signal
- import STROPTS
-
def handle_sigpoll(signum, frame):
print 'I got a SIGPOLL update'
+ import fcntl, signal, STROPTS
+
signal.signal(signal.SIGPOLL, handle_sigpoll)
fcntl.ioctl(audio_obj.fileno(), STROPTS.I_SETSIG, STROPTS.S_MSG)