diff --git a/python/reg-rename.py b/python/reg-rename.py index c48bfcf..43e95d2 100644 --- a/python/reg-rename.py +++ b/python/reg-rename.py @@ -29,7 +29,6 @@ parser.add_argument( "-t", action = "store_true", help = "Test without modifying args = parser.parse_args() -class ArgumentRequired( Exception ): pass class InvalidArgument( Exception ): pass class LevelLogger: @@ -112,13 +111,14 @@ class RegReplace: bb = "-\\|/" bb_i = 0 for root, dirs, files in os.walk( path ): + sys.stdout.write( "\n" ) # Move down + sys.stdout.write( "\033[K" ) # Clear line + sys.stdout.write( "%s ... %s" % ( bb[ bb_i ], root ) ) + actions = self._compile_actions( root, files ) - sys.stdout.write( "\n" ) - sys.stdout.write( "\033[K" ) - sys.stdout.write( "%s ... %s" % ( bb[ bb_i ], root ) ) - sys.stdout.write("\r") - sys.stdout.write( "\033[F" ) + sys.stdout.write("\r") # Goto line start + sys.stdout.write( "\033[F" ) # Move up bb_i = bb_i + 1 if 3 < bb_i: bb_i = 0 @@ -153,9 +153,6 @@ try: includes = _compile_re( args.p ) excludes = _compile_re( args.e ) - if not args.d: - raise ArgumentRequired( "-d" ) - if args.t: print( "** Test Mode" )