diff --git a/Scripts/enhancer.py b/Scripts/enhancer.py index bf79dfe48..4976e4409 100644 --- a/Scripts/enhancer.py +++ b/Scripts/enhancer.py @@ -45,6 +45,10 @@ class Enhance(Frame): # # main +if len(sys.argv) != 2: + print("Usage: enhancer file") + sys.exit(1) + root = Tk() im = Image.open(sys.argv[1]) diff --git a/Scripts/painter.py b/Scripts/painter.py index e5e4927b7..79470e8e5 100644 --- a/Scripts/painter.py +++ b/Scripts/painter.py @@ -66,12 +66,12 @@ class PaintCanvas(Canvas): # # main -root = Tk() - if len(sys.argv) != 2: print("Usage: painter file") sys.exit(1) +root = Tk() + im = Image.open(sys.argv[1]) if im.mode != "RGB": diff --git a/Scripts/thresholder.py b/Scripts/thresholder.py index 50c4bbcd2..c2e87d56a 100644 --- a/Scripts/thresholder.py +++ b/Scripts/thresholder.py @@ -60,6 +60,10 @@ class UI(Frame): # -------------------------------------------------------------------- # main +if len(sys.argv) != 2: + print("Usage: thresholder file") + sys.exit(1) + root = Tk() im = Image.open(sys.argv[1])