@spiceErrorCheck<EOL>def spkw02(handle, body, center, inframe, first, last, segid, intlen, n, polydg,<EOL>cdata, btime):
handle = ctypes.c_int(handle)<EOL>body = ctypes.c_int(body)<EOL>center = ctypes.c_int(center)<EOL>inframe = stypes.stringToCharP(inframe)<EOL>first = ctypes.c_double(first)<EOL>last = ctypes.c_double(last)<EOL>segid = stypes.stringToCharP(segid)<EOL>intlen = ctypes.c_double(intlen)<EOL>n = ctypes.c_int(n)<EOL>polydg = ctypes.c_int(polydg)<EOL>cdata = stypes.toDoubleVector(cdata)<EOL>btime = ctypes.c_double(btime)<EOL>libspice.spkw02_c(handle, body, center, inframe, first, last, segid, intlen,<EOL>n, polydg, cdata, btime)<EOL>
Write a type 2 segment to an SPK file.

http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw02_c.html

:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param intlen: Length of time covered by logical record.
:type intlen: float
:param n: Number of coefficient sets.
:type n: int
:param polydg: Chebyshev polynomial degree.
:type polydg: int
:param cdata: Array of Chebyshev coefficients.
:type cdata: Array of floats
:param btime: Begin time of first logical record.
:type btime: float