Python CMD and Argparse Part 1

The CMD Module The cmd module is a really cool tool for Python development - it provides a lightweight wrapper for an interactive command-line interface. It’s quick and easy to add basic commands to your program, and you can give help messages using nothing more than function docstrings. Here’s an example: from cmd import Cmd class Shell(Cmd): prompt = "\nshell > " def do_exit(self, _) -> bool: """Exits the cmdloop.""" return True def do_print(self, arg: str): """Prints your message.
Read more →

Creating A Hugo Site

Installing Hugo If you’re running Debian or Ubuntu, you can just install the hugo package with apt. Check the link to determine exactly which version this will install - it varies based on Sass/SCSS support. I’ll be installing from source, which requires Go version 1.11+. To install, it’s as simple as cloning the repository and installing it via Go. git clone https://github.com/gohugoio/hugo.git cd hugo go install –tags extended Creating a Site To create a new site, use the command hugo new site <name>.
Read more →