The library is originally modify from https://bitbucket.org/xdseed/elinux-tcl/