2 Scripting with Python

WHAT YOU WILL LEARN IN THIS CHAPTER:    

  • Accessing and managing computer resources via the operating system
  • Handling common file formats such as CSV and XML
  • Working with dates and times
  • Automating applications and accessing their APIs
  • Using third-party modules to extend automation beyond the standard library capabilities

WROX.COM DOWNLOADS FOR THIS CHAPTER

For this chapter the wrox.com code downloads are found at www.wrox.com/go/pythonprojects on the Download Code tab. The code is in the Chapter 2 download, called Chapter2.zip, and individually named according to the names throughout the chapter.

Often, you may find yourself undertaking tasks that involve many repetitive operations. To combat this repetition of work, it may be possible to write a macro to automate those operations within a single application but, if the operations span several applications, macros are rarely effective. For example, if you back up and archive a large multimedia web application, you may have to deal with content produced by one or more media tools, code from an IDE, and probably some database files, too. Instead of macros, you need an external programming tool to drive each application, or utility, to perform its part of the whole. Python is well suited to this kind of orchestration role.

Get Python Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.