<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rdtext(file, lenout=_default_len_out):
 # pragma: no cover """ Read the next line of text from a text file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rdtext_c.html :param file: Name of text file. :type file: str :param lenout: Available room in output line. :type lenout: int :return: Next line from the text file, End-of-file indicator :rtype: tuple """

    file = stypes.stringToCharP(file)
    line = stypes.stringToCharP(lenout)
    lenout = ctypes.c_int(lenout)
    eof = ctypes.c_int()
    libspice.rdtext_c(file, lenout, line, ctypes.byref(eof))
    return stypes.toPythonString(line), bool(eof.value)