mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
revert r69777 since all the experts agree that extra import lines distract from the code
This commit is contained in:
parent
5149742e8b
commit
a7b55a33f8
31 changed files with 42 additions and 96 deletions
|
@ -1347,8 +1347,7 @@ Let's say you want to send logging events across a network, and handle them at
|
|||
the receiving end. A simple way of doing this is attaching a
|
||||
:class:`SocketHandler` instance to the root logger at the sending end::
|
||||
|
||||
import logging
|
||||
import logging.handlers
|
||||
import logging, logging.handlers
|
||||
|
||||
rootLogger = logging.getLogger('')
|
||||
rootLogger.setLevel(logging.DEBUG)
|
||||
|
@ -2601,9 +2600,7 @@ properly preceded with the binary-encoded length, as the new logging
|
|||
configuration::
|
||||
|
||||
#!/usr/bin/env python
|
||||
import socket
|
||||
import struct
|
||||
import sys
|
||||
import socket, sys, struct
|
||||
|
||||
data_to_send = open(sys.argv[1], "r").read()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue