From 9a88e9ff0385f66e7c565a394908503dc6e916ad Mon Sep 17 00:00:00 2001 From: neodarz Date: Fri, 28 Apr 2017 00:30:19 +0200 Subject: Site updated at 2017-04-28T00:29:42+02:00 source branch was at: f1965c50670f611ef54f9471490d45a554f7d866 Correct a link --- ...sonal-helper-package-in-everyday-scripting.html | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 build/blog/2015-05-30-using-a-personal-helper-package-in-everyday-scripting.html (limited to 'build/blog/2015-05-30-using-a-personal-helper-package-in-everyday-scripting.html') diff --git a/build/blog/2015-05-30-using-a-personal-helper-package-in-everyday-scripting.html b/build/blog/2015-05-30-using-a-personal-helper-package-in-everyday-scripting.html new file mode 100644 index 00000000..0839d2b3 --- /dev/null +++ b/build/blog/2015-05-30-using-a-personal-helper-package-in-everyday-scripting.html @@ -0,0 +1,64 @@ + + + + + + + +Using a personal helper package in everyday scripting + + + + + + + + +
This blog has been archived.
Visit my home page at zhimingwang.org.
+ +
+
+

Using a personal helper package in everyday scripting

+ +
+

Recently I've been scripting (mostly in Python) quite a bit, and noticed that some functionalities get copied over or reimplemented over and over again. Examples include reading configuration files (mostly JSON, INI, and YAML), printing progress information to tty in color, displaying progress bar, and so on.

+

In light of this, I came up with the idea of keeping a pool of helper modules in a personal helper package. I'm unimaginative at naming things, so I just named my package zmwangx. It is published on GitHub, and the API docs are published on Read the Docs for easy reference during scripting.1 At the time of writing the following helper modules are available in the package:

+ +

With a personalized helper package, scripting has never been more enjoyable. Here are just some of the benefits:

+ +

Of course, one cannot depend on such a package in a formally published package (say, one published to PyPI), so things like tools.py or whatever are still necessary from time to time. But for day-to-day scripting, having a personal helper package that is used accross the board is definitely a good idea.

+
+
+
    +
  1. I'm pretty paranoid about documenting things.↩︎

  2. +
+
+
+
+ + + -- cgit v1.2.1