Lines Matching refs:file
13 Pass one or more file and/or directory paths. When a directory path, all
18 cleanfuture finds nothing to change, the file is left alone. If cleanfuture
19 does change a file, the changed file is a fixed-point (i.e., running
20 cleanfuture on the resulting .py file won't change it again, at least not
30 Example: Assuming you're using Python 2.2, if a file containing
78 def check(file):
79 if os.path.isdir(file) and not os.path.islink(file):
81 print("listing directory", file)
82 names = os.listdir(file)
84 fullname = os.path.join(file, name)
92 print("checking", file, "...", end=' ')
94 f = open(file)
96 errprint("%r: I/O Error: %s" % (file, str(msg)))
100 ff = FutureFinder(f, file)
110 print("%r lines %d-%d" % (file, s+1, e+1))
119 bak = file + ".bak"
122 os.rename(file, bak)
124 print("renamed", file, "to", bak)
125 with open(file, "w") as g:
128 print("wrote new", file)
139 self.lines = [] # raw file lines
211 errprint("Skipping file %r; can't parse line %d:\n%s" %
270 # Copy over the remainder of the file.