Updated cmd.py python library

Updated cmd.py python library to meet the program requirements