fork(1) download
  1. import PIL,os, sys
  2. from PIL import Image
  3.  
  4. infile = Image.open('C:/Users/myuser/Desktop/Untitled12.png')
  5.  
  6. for infile in sys.argv[1:]:
  7. f, e= os.path.splitext(infile)
  8. outfile = f + ".jpg"
  9. if infile != outfile:
  10. try:
  11. with Image.open(infile) as im:
  12. im.save(outfile)
  13. except OSError:
  14. print(f"Cannot convert {infile}")
  15.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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

stdout
Standard output is empty