so I need to access a telnet session. More specifically JPL's ephemeris service. I know exactly what I need to do in the command prompt, but I've had trouble using the telnetlib
package.
Here are the steps I need to take through command prompt:
telnet
o horizons.jpl.nasa.gov 6775
DES=C/2012 X1;
y
E
o
H06
y
2013-Nov-7 9:00
2013-Nov-17 9:00
1d
y
1,4,9,19,20,24
and then after that there is a large output that I need to save to a text file, or simply keep as a variable. I'll be using it later.
And following these inputs step by step should get you to the exact bit of information I need to grab
Any advice?
I would use
telnetlib.Telnet.expect()
, something like this:Between April and May 2013, some people actually wrote an entire Python package around JPL's Horizons Telnet interface. It can be found here:
https://pypi.python.org/pypi/HorizonJPL