title: Can python get the screen shot of a specific window?
body: <p>For example, I am running a java program. Can I use python to get the content(screenshot) of this java program? Not the full screen, just the java program.</p>
  
  <p>I have seen this module, but it required a parameter of "where the program window is":</p>
  
  <pre><code>import pyscreenshot as ImageGrab
  
  if __name__ == "__main__":
      # part of the screen
      im=ImageGrab.grab(bbox=(10,10,510,510)) # X1,Y1,X2,Y2
      im.show()
  #-#
  </code></pre>
  
  <p>But this may not be what I am seeking since it requires the bounding_box.</p>