- for name in args:
- os.chdir(os.path.dirname(name))
- batch_process(opts, parse_file(open(name)))
+ filenames = map(os.path.abspath, args)
+ for filename in filenames:
+ make_and_chdir(filename)
+ with open(filename) as fd:
+ batch_process(opts, parse_file(fd))