Skip to Content
Modern Python Standard Library Cookbook
book

Modern Python Standard Library Cookbook

by Alessandro Molina
August 2018
Intermediate to advanced
366 pages
10h 14m
English
Packt Publishing
Content preview from Modern Python Standard Library Cookbook

Command Line

In this chapter, we will cover following recipes:

  • Basic logging—logging allows you to keep track of what the software is doing, and it's usually unrelated to its output
  • Logging to filewhen logging is frequent, it is necessary to store the logs on a disk
  • Logging to Syslogif your system has a Syslog daemon, you might want to log in to Syslog instead of using a standalone file
  • Parsing argumentswhen writing with command-line tools, you need parsing options for practically any tool
  • Interactive shellssometimes options are not enough and you need a form of Read-Eval-Print Loop to drive your tool
  • Sizing terminal textto align the displayed output properly, we need to know the terminal window size
  • Running system commandshow to integrate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Python Development: Using Powerful Language Features in Real-World Applications

Advanced Python Development: Using Powerful Language Features in Real-World Applications

Matthew Wilkes

Publisher Resources

ISBN: 9781788830829Supplemental Content