summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-11-13 16:18:29 (GMT)
committerGuido van Rossum <guido@python.org>2002-11-13 16:18:29 (GMT)
commit455ab77f34038ec9ee05069c5a28317b0e17314d (patch)
tree7703da5cea50f304975bfdd52112da4ea6ac826a /Lib/logging
parent57102f861d506b6c2d2215d100dac9143574fa77 (diff)
downloadcpython-455ab77f34038ec9ee05069c5a28317b0e17314d.zip
cpython-455ab77f34038ec9ee05069c5a28317b0e17314d.tar.gz
cpython-455ab77f34038ec9ee05069c5a28317b0e17314d.tar.bz2
Get rid of #! lines, references to usage as __main__, README.txt, and
http://www.red-dove.com/python_logging.html.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py24
-rw-r--r--Lib/logging/config.py8
-rw-r--r--Lib/logging/handlers.py8
3 files changed, 4 insertions, 36 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index e0f2de5..1288301 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
@@ -15,12 +13,6 @@
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-# For the change history, see README.txt in the distribution.
-#
-# This file is part of the Python logging distribution. See
-# http://www.red-dove.com/python_logging.html
-#
"""
Logging package for Python. Based on PEP 282 and comments thereto in
@@ -58,16 +50,11 @@ __date__ = "27 August 2002"
#
#_srcfile is used when walking the stack to check when we've got the first
# caller stack frame.
-#If run as a script, __file__ is not bound.
-#
-if __name__ == "__main__":
- _srcfile = None
+if string.lower(__file__[-4:]) in ['.pyc', '.pyo']:
+ _srcfile = __file__[:-4] + '.py'
else:
- if string.lower(__file__[-4:]) in ['.pyc', '.pyo']:
- _srcfile = __file__[:-4] + '.py'
- else:
- _srcfile = __file__
- _srcfile = os.path.normcase(_srcfile)
+ _srcfile = __file__
+_srcfile = os.path.normcase(_srcfile)
#
#_startTime is used as the base when calculating the relative time of events
@@ -1178,6 +1165,3 @@ def shutdown():
for h in _handlers.keys():
h.flush()
h.close()
-
-if __name__ == "__main__":
- print __doc__
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 285dfdd..760da08 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
@@ -15,12 +13,6 @@
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-# For the change history, see README.txt in the distribution.
-#
-# This file is part of the Python logging distribution. See
-# http://www.red-dove.com/python_logging.html
-#
"""
Logging package for Python. Based on PEP 282 and comments thereto in
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index ea8b197..4c037da 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -1,5 +1,3 @@
-#! /usr/bin/env python
-#
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
@@ -15,12 +13,6 @@
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-# For the change history, see README.txt in the distribution.
-#
-# This file is part of the Python logging distribution. See
-# http://www.red-dove.com/python_logging.html
-#
"""
Logging package for Python. Based on PEP 282 and comments thereto in