title: find image pixels in python using Terminal?
body: <p>Consider I have an image <code>image.png</code> in a folder <code>XYZ</code>. I need a Python script which asks the user to enter the image name and the output should be the image pixel and size.</p>
  
  <p>I tried on terminal using <code>sips</code> command as following:</p>
  
  <pre><code>sips -g pixelWidth -g pixelHeight image.png
  </code></pre>
  
  <p>I need to incorporate the same on Python.  I tried with this code</p>
  
  
  
  <pre><code>import os
  for rootpath,dir,file in os.walk("/Volumes/Macintosh HD/users/username/myfolder"):
      for files in file:      
          def test(name):
              return (os.system(sips -g pixelWidth -g pixelHeight name))
  </code></pre>
  
  <p>But this is not helpful. I am new to Python and doing some experiments. So any help/idea will be appreciated :)</p>