diff --git a/dxf_to_csv/dxf_to_csv.py b/dxf_to_csv/dxf_to_csv.py index f1e4bf2..48f31f1 100644 --- a/dxf_to_csv/dxf_to_csv.py +++ b/dxf_to_csv/dxf_to_csv.py @@ -122,9 +122,14 @@ def main(): '-n', metavar='LAYER_NAME', help='name of layer', default=None) parser.add_argument( '-l', action='store_true', help='show list of layers', default=False) - args = parser.parse_args() + + # List usage if no arguments are provided + if len(sys.argv) == 1: + parser.print_help(sys.stderr) + sys.exit(1) # Parse arguments + args = parser.parse_args() dxf_name = args.dxf_name layer_name = args.n show_layers_only = args.l