-
Book Overview & Buying
-
Table Of Contents
Python Automation Cookbook - Third Edition
By :
An automated task's main characteristic is its fire-and-forget quality. We are not actively looking at the result, but making it run in the background.
On top of the problems and bugs of any program, most of the recipes in this book deal with external information, such as web pages or other reports. External information is inherently more varied and can contain unanticipated elements, increasing the likelihood of finding an unexpected problem when running. This recipe will present an automated task that safely stores unexpected behaviors in a log file that can be checked afterward.
As a starting point our task will be to divide two numbers, as described in the command line.
This task is very similar to the one presented in step 5 of How it works… for the Preparing a task recipe earlier in this chapter, except that instead of multiplying two numbers we'll divide them.
task_with_error_handling_step1...