def isCursorOnLastLine(entry): if entry.get_point() >= string.rfind(string.rstrip(entry.get_chars(0,-1)), '\n'): return 1