Q: How to add file (image) path to the command line argument in python This is the actual code
import argparse
import cv2

    ap=argparse.ArgumentParser()
    ap.add_argument("-i","--image",required=True,help="Enter the path")
    args=vars(ap.parse_args())
    
    image=cv2.imread(args["image"])
    print("The Height is : {}".format(image.shape[0]))
    print("The Width is : {}".format(image.shape[1]))
    print("The Channels is : {}".format(image.shape[2]))
    
    cv2.imshow("image".image)
    cv2.waitkey(10000)
    cv2.imwrite("cat1.jpg",image)

This error appears
line 1
python3 fetch_display.py -i D:/Wallpaper/cat.jpg
^
SyntaxError: invalid syntax
I gave input as :
 python3 fetch_display.py -i D://Wallpaper//cat.jpg

