Added reset and input flush. Changed to sys.stdout.write to avoid adding additional newline.
Added reset and input flush.
Changed to sys.stdout.write to avoid adding additional newline.

cacack/fermtemp,cacack/fermtemp