Command Line Interfaces in Python (Overview)
Adding the capability of processing Python command line arguments provides a user-friendly interface to your text-based command line program. It’s similar to what a graphical user interface is for a visual application that’s manipulated by graphical elements or widgets.
Python exposes a mechanism to capture and extract your Python command line arguments. These values can be used to modify the behavior of a program. For example, if your program processes data read from a file, then you can pass the name of the file to your program, rather than hard-coding the value in your source code.
By the end of this course, you’ll know:
- The origins of Python command line arguments
- The underlying support for Python command line arguments
- The standards guiding the design of a command line interface
- The basics to manually customize and handle Python command line arguments
- The libraries available in Python to ease the development of a complex command line interface
00:00 Hi and welcome to this Real Python video tutorial series on command line interfaces. By the end of this course, you’ll know the origins of the Python command line argument system, the underlying support that Python offers you for command line arguments, you’ll learn some of the standards guiding the design of a command line interface, and then, of course, you’ll learn both the basics to manually customize and handle Python command line arguments on your own, as well as the existing libraries and packages that are available in Python to ease the development of a complex command line interface.
00:35 The structure of this course will be quite simple. There will be three main sections, each with several lessons within them. The first section will cover command line interfaces: what they are, how they work, and how you can start to work with them in Python.
00:50 The second section will cover how to implement a command line interface in bare Python without any other packages other than the standard library. And the third section will cover how to use existing Python packages to build a more complex command line interface. Let’s jump right in.
Become a Member to join the conversation.