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

PURPOSE --
A general purpose tool for setting up or restarting an FTP batch job.
 
DEVELOPER --
Don Chance
 
MODIFICATION HISTORY --
Initial implementation  1/22/01
Added cluster PC.  drc 12/6/01
Modified to work on Unix as well as VMS.  drc 12/6/01
Add option to send files as ASCII. drc 12/7/01
Change SSSP to SSSP1. drc 5/28/03
Get CCS string names from ccs_util. drc 7/24/03
update for public key authentication. drc 6/20/13
updated for Python 3 compatibility. drc 10/9/14
add an scp option. drc 12/16/14

 
Modules
       
batch_util
getpass
os
spss_sys_util
spst_getopt
transfer_util

 
Classes
       
batch_util.batch(__builtin__.object)
ftp_daemon

 
class ftp_daemon(batch_util.batch)
    
Method resolution order:
ftp_daemon
batch_util.batch
__builtin__.object

Methods defined here:
setup(self)
transfer(self)
Perform the actual file transfers.

Methods inherited from batch_util.batch:
__init__(self, jobname=None, setup=1)
Constructor for batch objects.
 
If 'setup' is 0 (false), don't run the setup function.
If 'setup' is 1, run the setup function.
If 'setup' is 2, run the setup function, but also run the function to
query for the command that runs recursively.  The reason for two levels
of setup arises because some subclasses may know the command they need
to run, while others need to have the user specify it.
__repr__(self)
check(self)
Checks that the batch job is in the queue.
 
Returns true if the batch job is found, otherwise returns false.
pprint(self)
Print out all attributes for examination.
save(self)
Save this object onto disk.
 
Use the old pickle file name if it exists.
set_command(self)
start(self)
Start the batch job running.
status(self)
Checks that the batch job is in the queue.
 
Returns dictionary of status information if the batch job is found,
otherwise returns an empty dictionary

Data descriptors inherited from batch_util.batch:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
input = raw_input(...)
raw_input([prompt]) -> string
 
Read a string from standard input.  The trailing newline is stripped.
If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError.
On Unix, GNU readline is used if enabled.  The prompt string, if given,
is printed without a trailing newline before reading.
run(*args)
Setup or restart a batch FTP job.
 
Usage:
do ftp_daemon [-setup|-start=jobname|-list=jobname|-run=jobname]
 
The -setup option causes the program to prompt the user for all the
information neccessary for setting up and starting a regular FTP
transfer between the local system and a remote system.
 
When the -start option is used, the user must specify a jobname.
If an job has previously been created with this name, the information
needed to start the job will be gathered from a disk file and the job
will be started.  Otherwise, the user will be prompted for information
necessary to start the job as in the -setup case.
 
The -list option causes the information stored about the specified
job to be printed to the screen.
 
The -run option causes the transfer specified by jobname to be executed.

 
Data
        CLUSTERS = ['PC', 'OPUS', 'FDF', 'SPUNIX', 'SSSP1', 'STOSC', 'CCSI', 'CCSJ', 'CCSK']
VALID_CCS_STRINGS = ['I', 'J', 'K']
__version__ = '14.12.16'
s = 'K'