Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/get_web_tut.html
Дата изменения: Fri Apr 8 12:46:14 2016
Дата индексирования: Mon Apr 11 01:31:28 2016
Кодировка:
Python: module get_web_tut
 
 
get_web_tut (version 16.01.07)
index
get_web_tut.py

PURPOSE --
Creates a local copy of the TUT file available on the web.
 
DEVELOPER --
Alan Patterson
 
MODIFICATION HISTORY --
Initial implementation              app 05/08/03
Modified to spoof user-agent        dc  08/07/03
rename                              dc  10/13/03
use urillib3 or urllib2 based on
the python version                  dc  11/04/03
Update default output file name     app 01/19/04
remove urllib3                      dc   9/21/04
new location for tut file           app 03/03/05
add verbose, update for OBS         app 12/05/06
make services case insensitive      app 05/23/07
option to access published TUT      app 09/05/07
add TDS, 171 and 275 to default list  app 06/27/08
ensure ssh usage                      app 05/07/09
update for SNAS website (SWSI going away)   app 10/14/10
update for use outside of SOGS       drc 03/24/11
update to get TDRS from tdrsuse file via ephem_util drc 11/25/14
replace yoda and palpatine with tugger and dunwell drc 1/7/16

 
Modules
       
os
socket
spss_sys_util
spst_getopt
string
sys
time_util
urllib2

 
Functions
       
run(*args)
Get the TUT file from its website
 
do get_web_tut [-tdrs=<tdrs_list>] [-services=<services_list>]
               [-start=<start_time>] [-end=<end_time>]
               [-outfile=<outfilename>] [-get] [-verbose]
               [-published] [-machine=<node>]
 
            where  -tdrs=tde,tdw,..    indicates which TDRS satellites
                                       to limit the request to.
                                       (TDE,TDW,171,275, etc.)
                   -services=mar,sa    indicates which services to limit
                                       the request to.
                                       (MAR,MAF,SA,SMAR,SMAF)
                   -start=<start_time> indicates the start of the time
                                       window for which to report events
                   -end=<end_time>     indicates the end of the time
                                       window for which to report events
                   -outfile=<tut_file_name> specifies the output file
                                       name. It defaults to tut_yyyy_mmdd_HHMM.tmp
                   -get                request data from the web rather than
                                       printing documentation (which would be
                                       the default action with no args)
                   -verbose            provides informational messages
                                       during execution
                   -published          retrieve published (full) TUT file
                                       Options start, end, tdrs and services
                                       will be ignored
                   -machine=<node>     Indicate machine to execute the web
                                       request from.  Default is current node,
                                       or holst if the current node is not in
                                       the acceptable NODELIST

 
Data
        NODELIST = ['holst.sogs.stsci.edu']
NODES = ['holst.sogs.stsci.edu']
NOMINAL_TDRS_COMBO = ('TDS', 'TDW', 'TDE', '171')
OBSNODES = ('scarlatti.ccs.hst.nasa.gov', 'corelli.ccs.hst.nasa.gov')
PASS_SYSTEM = 'ops'
TDRS_LIST = ('171', '150', 'TDS', '046', 'TDW', '041', '174', '220', '275', 'TDE')
TESTNODES = ['tugger.stsci.edu', 'dunwell.stsci.edu']
__author__ = 'Alan Patterson'
__version__ = '16.01.07'

 
Author
        Alan Patterson