5 from twisted.python import usage
7 class Options(usage.Options):
9 ("recursive", "r", "Search for .py files recursively"),
11 def parseArgs(self, *starting_points):
12 self.starting_points = starting_points
18 for i,line in enumerate(f.readlines()):
23 if line.rstrip() != line:
24 # the %s:%d:%d: lets emacs' compile-mode jump to those locations
25 print "%s:%d:%d: trailing whitespace" % (fn, i+1, len(line)+1)
32 for starting_point in o.starting_points:
33 for root, dirs, files in os.walk(starting_point):
34 for fn in [f for f in files if f.endswith(".py")]:
35 fn = os.path.join(root, fn)
38 for fn in o.starting_points: