@@ -27,13 +27,13 @@ def select_image():
2727 print ("[5] Custom Image" )
2828
2929 while True :
30- choice = input ("\n Enter the number of the image to test, or provide a full path to your own image:\n > " ).strip ()
30+ choice = input ("\n Enter the number of the image to test, or provide a full path to your own image:\n > " ).strip (' \' "' )
3131 image_path , matched_template , description = None , None , None
3232 if choice in sample_images :
3333 image_path , matched_template , description = sample_images [choice ]
3434 image_path = os .path .join (".." , image_path )
3535 elif choice == "5" :
36- image_path = input ("Enter full path to your custom image:\n > " ).strip ()
36+ image_path = input ("Enter full path to your custom image:\n > " ).strip (' \' "' )
3737 if not os .path .isfile (image_path ):
3838 print ("Invalid path input, please try again." )
3939 continue
@@ -61,14 +61,14 @@ def select_template(matched_template, description):
6161 print ("\n Enter the number of the template to test, or provide a full path to your own template:" )
6262
6363 while True :
64- choice = input ("> " ).strip ()
64+ choice = input ("> " ).strip (' \' "' )
6565 selected_path = None
6666 if choice .isdigit ():
6767 index = int (choice ) - 1
6868 if 0 <= index < len (options ):
6969 selected_path = options [index ][0 ]
7070 if selected_path == options [- 1 ][0 ]:
71- selected_path = input ("Enter full path to your custom template:\n > " )
71+ selected_path = input ("Enter full path to your custom template:\n > " ). strip ( ' \' "' )
7272 elif selected_path == options [- 2 ][0 ]:
7373 package_dir = os .path .dirname (dynamsoft_barcode_reader_bundle .__file__ )
7474 selected_path = os .path .join (package_dir , "Templates" , "DBR-PresetTemplates.json" )
0 commit comments