Python in System Administration: How, When, and Why one SysAdmin uses Python
Sean Reifschneider
tummy.com, ltd.
Python for the System Admin
Monitoring
Helpers
Automation
Accounting
Random Scripts
System Admin Constraints
5% Programmer
Using Older Python Versions (Enterprise)
Security/Privilege Issues
Integration (system commands, file-system, GUIs, web)
Heavy Data processing
Benefits of Python
Execute commands as tuples
subprocess.call(['ls', '-ld', '/etc'])
Exceptions and Tracebacks
Regexes
Networking
Fewer forks
Lots of libraries
Complex algorithms
Database access
These are a few of my favorite things:
fileinput re syslog
datetime email
os shutil ConfigParser
optparse pwd/grp telnetlib
subprocess popen urllib2
smtplib/imaplib/poplib
SocketServer
sys crypt pty commands