Task automation with Python