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
::...
免责声明:
当前网页内容, 由
大妈 ZoomQuiet
使用工具:
ScrapBook :: Firefox Extension
人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:
或是邮件反馈可也:
askdama[AT]googlegroups.com
订阅 substack 体验古早写作:
点击注册~> 获得
100$ 体验券:
关注公众号, 持续获得相关各种嗯哼:
自怼圈/年度番新
关于 ~ DebugUself with DAMA ;-)
粤ICP备18025058号-1
公安备案号:
44049002000656
...::