mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00

\t\t\t\t\treal code ##\t\t\t\t\tunused code \t\t\t\t\treal code via untabifying and shifting the real code left. Semantically the same but made the intent of the commented-out-in-column-0 unused code unclear. The exact same unused code appears to have gotten copied from file to file over the years.
48 lines
1.2 KiB
Python
Executable file
48 lines
1.2 KiB
Python
Executable file
#! /usr/bin/env python
|
|
|
|
OLD_NOTICE = """/***********************************************************
|
|
Copyright (c) 2000, BeOpen.com.
|
|
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
|
|
Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
|
|
All rights reserved.
|
|
|
|
See the file "Misc/COPYRIGHT" for information on usage and
|
|
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
******************************************************************/
|
|
"""
|
|
|
|
NEW_NOTICE = ""
|
|
|
|
# " <-- Help Emacs
|
|
|
|
import os, sys, string
|
|
|
|
def main():
|
|
args = sys.argv[1:]
|
|
if not args:
|
|
print "No arguments."
|
|
for arg in args:
|
|
process(arg)
|
|
|
|
def process(arg):
|
|
f = open(arg)
|
|
data = f.read()
|
|
f.close()
|
|
i = string.find(data, OLD_NOTICE)
|
|
if i < 0:
|
|
## print "No old notice in", arg
|
|
return
|
|
data = data[:i] + NEW_NOTICE + data[i+len(OLD_NOTICE):]
|
|
new = arg + ".new"
|
|
backup = arg + ".bak"
|
|
print "Replacing notice in", arg, "...",
|
|
sys.stdout.flush()
|
|
f = open(new, "w")
|
|
f.write(data)
|
|
f.close()
|
|
os.rename(arg, backup)
|
|
os.rename(new, arg)
|
|
print "done"
|
|
|
|
if __name__ == '__main__':
|
|
main()
|