Generating Command-Line Interfaces (CLI) with Fire in Python

Introduction A Command-line interface (CLI) is a way to interact with computers using textual commands. A lot of tools that don’t require GUIs are written as CLI tools/utilities. Although Python has the built-in argparse module, other libraries with similar functionality do exist. These libraries can help us in writing CLI scripts, providing services like parsing options and flags to much more advanced CLI functionality. This article discusses the Python Fire library, written by Google Inc., a useful tool to create […]

Read more

How to Write a Makefile – Automating Python Setup, Compilation, and Testing

Introduction When you want to run a project that has multiple sources, resources, etc., you need to make sure that all of the code is recompiled before the main program is compiled or run. For example, imagine our software looks something like this: main_program.source -> uses the libraries `math.source` and `draw.source` math.source -> uses the libraries `floating_point_calc.source` and `integer_calc.source` draw.source -> uses the library `opengl.source` So if we make a change in opengl.source for example, we need to recompile both […]

Read more