<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ekopn(fname, ifname, ncomch):
 """ Open a new E-kernel file and prepare the file for writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopn_c.html :param fname: Name of EK file. :type fname: str :param ifname: Internal file name. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: Handle attached to new EK file. :rtype: int """

    fname = stypes.stringToCharP(fname)
    ifname = stypes.stringToCharP(ifname)
    ncomch = ctypes.c_int(ncomch)
    handle = ctypes.c_int()
    libspice.ekopn_c(fname, ifname, ncomch, ctypes.byref(handle))
    return handle.value