#NEWLINE# @ contextmanager #NEWLINE# def cursor( lcd , row , col ) : #NEWLINE# #INDENT# "Context manager to control cursor position.\n\n    Args:\n        lcd:\n            The CharLCD instance.\n        row:\n            The target row (0 index based).\n        col:\n            The target column (0 index based).\n\n    Example:\n\n    >>> with cursor(lcd, 2, 0):\n        lcd.write_string('This is the hird row')\n\n    " #NEWLINE# lcd . cursor_pos = ( col , col ) #NEWLINE# ( yield )