+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description='Remove old files')
+ parser.add_argument('-i', '--inhibit-progress-bar', action='store_true',
+ help='inhibit progress bar')
+ parser.add_argument('-s', '--silent', '--quiet', action='store_true',
+ help='be silent (implied -i)')
+ parser.add_argument('fname1', help='the first file name')
+ parser.add_argument('fname2', help='the second file name')
+ args = parser.parse_args()
+
+ show_pbar = not args.inhibit_progress_bar and not args.silent \
+ and sys.stderr.isatty()
+
+ if show_pbar:
+ try:
+ from m_lib.pbar.tty_pbar import ttyProgressBar
+ except ImportError:
+ show_pbar = False
+
+ if show_pbar:
+ try:
+ size = os.path.getsize(args.fname1)
+ except Exception:
+ print(args.fname1, ": no such file")
+ sys.exit(1)