Chapter 7. Version Management System

Imagine you are the administrator of three computer labs. Some of the machines have had their versions of Java and Python updated, but you're not sure how many, or which ones. You could go to each computer individually and check.

But you're not going to do that.

By building a Python script to connect to your machines and check version levels, you can automatically build a list of the version of installed applications on each computer.

The version management system in this chapter shows how you can use Telnet to retrieve version information for a list of applications (in this program, the applications checked will be Java, Python, and Perl). The program will then write the results of the check to a CSV log file.

The application will perform the following functions:

  • Allow the user to identify an IP address and a list of applications to check for (entered via command-line arguments)

  • Log in, using Telnet, to the machine and check the version numbers of each application

  • Write the results of the query to a CSV log file

Using the Program

Before the program is run, any remote computers to be connected ...

Get Python® Create-Modify-Reuse 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.