Operations automation with Python

When I have recurrent operations I usually try to find a way to automate them. One of the best tool for this is Python. With Python you can easily create a cross platform script that can do almost anything you want with minimal effort. Let me give you one example:

from PIL import *
from PIL import Image
import pytesseract

image= Image.open('scanned_document.png')
text = pytesseract.image_to_string(image)
print text

Believe it or not this snippet loads the “scanned_document.png” image file, reads the text from the image using an OCR  and prints the text on the screen. So if you need to extract information from WEB pages, download files, move files in your file system etc.. repeatedly, I think you should consider using Python to automate these operations.

2 thoughts on “Operations automation with Python

  1. Thanks for suggestion. I just checked the “Tower” from Ansible, it looks great, but for me it has two problems: it’s not free and it’s too complex. I mean, I think is great for managing development project builds, for big organizations (Jenkins replacement) but it’s too complex for simple tasks such as download file, copy it, store it into db etc..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s