title: Script to process all images in a single directory using Python
body: <p>This is what i have tried so far. Images are in .jpg file. I am trying to write a script that can run resize.py to resize all the images at once. No import is used in this .py script</p>
  
  <pre><code>for file in *.jpg; do
    python resize.py "$file"
  done
  </code></pre>
  
  <p>Error returned to me was </p>
  
  <pre><code>  File "test.py", line 2
      for file in *.jpg; do
                  ^
  </code></pre>
  
  <p>SyntaxError: invalid syntax</p>