@spiceErrorCheck<EOL>def txtopn(fname):
fnameP    = stypes.stringToCharP(fname)<EOL>unit_out  = ctypes.c_int()<EOL>fname_len = ctypes.c_int(len(fname))<EOL>libspice.txtopn_(fnameP, ctypes.byref(unit_out), fname_len)<EOL>return unit_out.value<EOL>
Internal undocumented command for opening a new text file for
subsequent write access.

https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Files
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Examples

:param fname: name of the new text file to be opened.
:type fname: str
:return: FORTRAN logical unit of opened file
:rtype: int