Prompted from this Stack Overflow question this little sample was thrown together.
Drag and drop a file with text, and run the pytesseract image_to_string method to obtain the text from the image.
It would be recommended to review how to preprocess images for best results. This article covers how to do some of that.