def position ( self , x , y , text ) : sys . stdout . write ( "\x1b7\x1b[%d;%df%s\x1b8" % ( x , y , text ) ) sys . stdout . flush ( )
python formatting ansi escape character
ANSI Escape sequences http : // ascii - table . com / ansi - escape - sequences . php
def position(self, x, y, text):
        """
            ANSI Escape sequences
            http://ascii-table.com/ansi-escape-sequences.php
        """
        sys.stdout.write("\x1b7\x1b[%d;%df%s\x1b8" % (x, y, text))
        sys.stdout.flush()