Lines Matching refs:file
5 Actually, this script will simply replace a block of text in a file from one
7 throughout the file. It writes a backup file and then does an os.rename()
15 --oldnotice=file
16 Use the notice in the file as the old (to be replaced) string, instead
19 --newnotice=file
20 Use the notice in the file as the new (replacement) string, instead of
26 file.
29 Print a message for every file looked at, indicating whether the file
39 See the file "Misc/COPYRIGHT" for information on usage and
40 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
86 def process(file):
87 with open(file) as f:
92 print('no change:', file)
95 print(' change:', file)
97 # Don't actually change the file
100 new = file + ".new"
101 backup = file + ".bak"
104 os.rename(file, backup)
105 os.rename(new, file)