@@ -27,13 +27,13 @@ def select_image():
27
27
print ("[5] Custom Image" )
28
28
29
29
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 (' \' "' )
31
31
image_path , matched_template , description = None , None , None
32
32
if choice in sample_images :
33
33
image_path , matched_template , description = sample_images [choice ]
34
34
image_path = os .path .join (".." , image_path )
35
35
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 (' \' "' )
37
37
if not os .path .isfile (image_path ):
38
38
print ("Invalid path input, please try again." )
39
39
continue
@@ -61,14 +61,14 @@ def select_template(matched_template, description):
61
61
print ("\n Enter the number of the template to test, or provide a full path to your own template:" )
62
62
63
63
while True :
64
- choice = input ("> " ).strip ()
64
+ choice = input ("> " ).strip (' \' "' )
65
65
selected_path = None
66
66
if choice .isdigit ():
67
67
index = int (choice ) - 1
68
68
if 0 <= index < len (options ):
69
69
selected_path = options [index ][0 ]
70
70
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 ( ' \' "' )
72
72
elif selected_path == options [- 2 ][0 ]:
73
73
package_dir = os .path .dirname (dynamsoft_barcode_reader_bundle .__file__ )
74
74
selected_path = os .path .join (package_dir , "Templates" , "DBR-PresetTemplates.json" )
0 commit comments