Python Circular Imports

What is a Circular Dependency?

A circular dependency occurs when two or more modules depend on each other. This is due to the fact that each module is defined in terms of the other (See Figure 1).

For example:




The code above depicts a fairly

Continue Reading

Python: List Files in a Directory

I prefer to work with Python because it is a very flexible programming language, and allows me to interact with the operating system easily. This also includes file system functions. To simply list files in a directory the modules os, subprocess, fnmatch, and pathlib come into play. The following solutions

Continue Reading

Linux: Find Files Containing Text

This topic is essential knowledge for every user of UNIX, Linux, Solaris, OS X, and BSD. Furthermore, the LPI certification contains tricky questions about this.

If you want to find files with a certain filename using the command line then use either the find or the locate commands. But if

Continue Reading