title: Python send png file to default printer
body: <p>I have a thermal printer and I would love to print a logo on top of the receipt... Is there something such as shutil.copyfile for png images?</p>
  
  <p>My code is the following</p>
  
  <pre><code>   locations = ['/dev/usb/lp0', '/dev/usb/lp1', '/dev/usb/lp2']
          size = locations.__len__()
          i = 0
  
          while i &lt; size:
              printer = locations[i]
              try:
                  shutil.copyfile('output.txt', printer)
                  break
              except IOError:
                  i += 1
  
          if i == size:
              logging.error('Unable to connect to the printer')
  </code></pre>