`clear` cmd is now inactive if stdout is not a tty

Running the clear command if stdout is not a tty,
simply does nothing now.
Make baseclass objects PEP8 compliant