summaryrefslogtreecommitdiffstats
path: root/Doc/howto/logging-cookbook.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2010-12-22 15:04:15 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2010-12-22 15:04:15 (GMT)
commit689b68ad2d3e1b315aeef81a23b947b9851378a8 (patch)
tree04531ce514358c7be795a3e2046bedd262ca0aca /Doc/howto/logging-cookbook.rst
parent5e9b14c39eb646afca1d6f5dd48e717ab3dd3c7d (diff)
downloadcpython-689b68ad2d3e1b315aeef81a23b947b9851378a8.zip
cpython-689b68ad2d3e1b315aeef81a23b947b9851378a8.tar.gz
cpython-689b68ad2d3e1b315aeef81a23b947b9851378a8.tar.bz2
Logging documentation updates.
Diffstat (limited to 'Doc/howto/logging-cookbook.rst')
-rw-r--r--Doc/howto/logging-cookbook.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index ea1756b..1e6aa6f 100644
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -8,8 +8,6 @@ Logging Cookbook
This page contains a number of recipes related to logging, which have been found useful in the past.
-.. Contents::
-
.. currentmodule:: logging
Using logging in multiple modules
@@ -249,7 +247,8 @@ configuration::
#!/usr/bin/env python
import socket, sys, struct
- data_to_send = open(sys.argv[1], 'r').read()
+ with open(sys.argv[1], 'rb') as f:
+ data_to_send = f.read()
HOST = 'localhost'
PORT = 9999