2018 Aug 04 By itops_admin 0 comment

Following the last post “Python textwrap – Fix Your Multiline Strings Indentations” – where we learned how to fix the indentation caused by the python indentation standards. In this post I want to show you how to create a wrap to your text that support multiline and smart indent. This might sound old to you but the original terminal (standard) was and still is 80 characters width. Long ago when I’ve started working on CLI applications and scripts my boss asked me to see the “usage/help” of one of them, then he looked at me and said – This is…

2018 Aug 04 By itops_admin 1 comment

I’ve been writing a lot in python the last couple of months and most of my code is for a CLI oriented environment (Mostly Linux/Unix shell). One of the most important things when you create CLI is the help and usage string – Mostly because other people will try to use it – But lets face it, that script you’ve written a month ago? You’ve probably completely forgotten how it works. So writing help or usage usually means that you work with an external file or multiline string. Now with a file there is no problem but a multiline is…