Better Arguments for Python CLI Script

Python is an excellent language to create scripts that perform utility tasks, but to add flexibility to any script it needs to accept parameters. Getting parameters is easy enough, using sys.argv as illustrated in the example below.

import sys

# Ensure there are at least 3 arguments, of course...
7th Mar 2025
Python: Creating Folders and Modifying their Dates

Python: Creating Folders and Modifying their Dates

I recently had a need to make a simple application that created a series of folders, which normally isn't hard, but I had one requirement, which was to make the folder's create and modification dates specific.

So, how to create the folders. In python, it's simple enough to just use the os library'...

5th Feb 2024