import PIL,os, sys
from PIL import Image
infile = Image.open('C:/Users/myuser/Desktop/Untitled12.png')
for infile in sys.argv[1:]:
f, e= os.path.splitext(infile)
outfile = f + ".jpg"
if infile != outfile:
try:
with Image.open(infile) as im:
im.save(outfile)
except OSError:
print(f"Cannot convert {infile}")
aW1wb3J0IFBJTCxvcywgc3lzCmZyb20gUElMIGltcG9ydCBJbWFnZQoKaW5maWxlID0gSW1hZ2Uub3BlbignQzovVXNlcnMvbXl1c2VyL0Rlc2t0b3AvVW50aXRsZWQxMi5wbmcnKQoKZm9yIGluZmlsZSBpbiBzeXMuYXJndlsxOl06CiAgICBmLCBlPSBvcy5wYXRoLnNwbGl0ZXh0KGluZmlsZSkKICAgIG91dGZpbGUgPSBmICsgIi5qcGciCiAgICBpZiBpbmZpbGUgIT0gb3V0ZmlsZToKICAgICAgICB0cnk6CiAgICAgICAgICAgIHdpdGggSW1hZ2Uub3BlbihpbmZpbGUpIGFzIGltOgogICAgICAgICAgICAgICAgaW0uc2F2ZShvdXRmaWxlKQogICAgICAgIGV4Y2VwdCBPU0Vycm9yOgogICAgICAgICAgICBwcmludChmIkNhbm5vdCBjb252ZXJ0IHtpbmZpbGV9IikK
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/py_compile.py", line 117, in compile
raise py_exc
py_compile.PyCompileError: File "prog.py", line 14
print(f"Cannot convert {infile}")
^
SyntaxError: invalid syntax