Programming in Python 3: A Complete Introduction to the Python Language
by Mark Summerfield
Learning Python, 4th Edition
by Mark Lutz
Regular Expressions Cookbook
by Jan Goyvaerts; Steven Levithan
Python Essential Reference, Fourth Edition
by David M. Beazley
Programming Python, 3rd Edition
by Mark Lutz
Python Cookbook, 2nd Edition
by Alex Martelli; Anna Martelli Ravenscroft; David Ascher
Python is an ideal language for solving problems, especially in Linux and Unix networks. With this pragmatic book, administrators can review various tasks that often occur in the management of these systems, and learn how Python can provide a more efficient and less painful way to handle them. Each chapter in Python for Unix and Linux System Administration presents a particular administrative issue, such as concurrency or data backup, and presents Python solutions through hands-on examples. Once you finish this book, you'll be able to develop your own set of command-line utilities with Python to tackle a wide range of problems. Discover how this language can help you:
Read text files and extract information
Run tasks concurrently using the threading and forking options
Get information from one process to another using network facilities
Create clickable GUIs to handle large and complex utilities
Monitor large clusters of machines by interacting with SNMP programmatically
Master the IPython Interactive Python shell to replace or augment Bash, Korn, or Z-Shell
Integrate Cloud Computing into your infrastructure, and learn to write a Google App Engine Application
Solve unique data backup challenges with customized scripts
Interact with MySQL, SQLite, Oracle, Postgres, Django ORM, and SQLAlchemy
With this book, you'll learn how to package and deploy your Python applications and libraries, and write code that runs equally well on multiple Unix platforms. You'll also learn about several Python-related technologies that will make your life much easier.
Average Amazon.com® Rating: ![]()
![]()
![]()
![]()
Based on 13 Ratings
A good book with some typos - 2009-03-12
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
I recently got my hands on a copy of "Python for Unix and Linux System Administration". After reading it, I felt the time I've invested in reading it was well spent. The author introduced the reader to many different situations where python would help make their lives as system administrators easier, without confusing the reader with some complex forms or statements. My feeling is that this book is aimed at people who want to use Python to solve their problems quickly and efficiently, but only have a limited experience with the language - and the books fits that purpose well with its rather superficial approach that the reader can later extend later on with various available resources. It would only be fair that I too mention some of the shortcomings that I noticed while reading this book.
Pros:
1) The author introduces the reader to ways that Python can be used.
2) Most of the time there will be more than one way to accomplish a task. The author at times presents a scenario and showed the reader how to do the same task with different modules. This places the choice of which to use back where it belongs, with the reader.
3) The book has a website (most do these days) where the code examples can be downloaded. http://py4sa.appspot.com/
Cons:
1) More time was spent on iPython than was really needed.
2) The case of a word is important in Python. For instance "import Sys" and "import sys" are two completely different things. There were quite a few occasions where a module name was used as the first word in the sentence and because of that it was capitalized.
3) There was once instance that I saw where a script example had no indentation at all. Trying to run it would have resulted in complete failure.
4) It would have been nice if the script examples were named instead of leaving it to the reader to figure it out based on the imports used in another example.
When all is said and done I think I would recommend the book to others if I knew that they had at least some background with Python. And I would highly recommend that they check the addendum and errata pages.
Examples aren't working - 2009-03-11
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
The example scripts in the PDF don't always work and have errors. Check out this snippet from page 210 of the PDF:
def create_checksum(path):
"""
Reads in file. Creates checksum of file line by line.
Returns complete checksum total for file.
"""
fp = open(path)
checksum = hashlib.md5()
while True:
buffer = fp.read(8192)
if not buffer:break
checksum.update(buffer)
fp.close()
checksum = checksum.digest()
return checksum
Here is an iterative example that uses this function with IPython to compare two files:
In [2]: from checksum import createChecksum
In [3]: if createChecksum("image1") == createChecksum("image2"):
...: print "True"
...:
...:
True
In [5]: if createChecksum("image1") == createChecksum("image_unique"):
print "True"
...:
...:
The first example defines create_checksum and the second calls createChecksum. But that's not all, the indentation is off and there is no main method in the first example. I'm spending more time figuring out why the examples don't work than learning Python. If you like proof reading and troubleshooting syntax, this is the book for you.
The book is supposed to have an image of all the scripts somewhere but there is not link in the PDF. At least not in the first 200 pages.
Got me hooked on Python - 2009-03-23
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
I felt this was a much better book for me than two other Oreilly titles for picking up Python. That being said, I do believe having a background in another language (Perl/Bash/etc.) and being a Linux/*nix admin is required to get the most from it.
It gave great examples that made practical sense and covered a ton of topics.
My only knocks would be I wish the iPython chapter was not included and the final chapter "Pragmatic Examples" was extended.
If you have never used Perl, or another language, the intro section may not be enough to get you to follow along - that being said, most admins I'm sure have already been exposed to a language of some sort.
Not a bad book at all, but it didn't inspire me either - 2009-03-17
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
I have four Python books on my shelf. I like the language, at least in theory. It is easy to read, clear, and powerful. In practice, I really don't program much. I was hoping that this book might push me over the edge from writing shell and PHP scripts for my simple needs into Python land. So many of my friends love the language.
I read the book this week. There are a lot of great ideas in there that would be useful for a sysadmin. The examples chosen are generally practical and useful. I was a bit disappointed by the occasional typographical or capitalization error, especially in code examples and discussion, which are not uncommon in first edition books, but are generally uncommon from O'Reilly books. I also found the early emphasis on iPython to be a bit excessive.
This is a little shorter than my usual review, mainly because I can't think of much else to say about the text. It isn't bad, but it isn't great. A sysadmin who is motivated to use Python will find it useful as a foundation. A veteran Python programmer who wants to use the language for systems administration will probably find the book filled with stuff they could have figured out anyway. I wanted to love the book, but I didn't. I didn't hate the book, either. I just feel a bit "meh" about it.
Good book - 2009-08-26
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Maybe the comparission between bash features and python features are not very good.
When Autor try to demostrate python is better, he give some bad examples.
Seems like Autor doesn't like bash syntax. For various tasks bash is really better, because it was dessign for do it.
Later, the book is improved and give you some very good tips
Top Level Categories:
Operating Systems
Programming
Sub-Categories:
Operating Systems > Linux
Linux > Network Administration
Operating Systems > UNIX
UNIX > Administration
Programming > Python
Some information on this page was provided using data from Amazon.com®. View at Amazon >