Home | Trees | Indices | Help |
---|
|
object --+ | extension.Extension --+ | Host
A 'Host' is a logical machine.
Each logical machine has a default directory. When a file is uploaded to or downloaded from the machine, and a relative path is specified, the patch is relative to the default directory. Similarly, when a program is run on the remote machine, its initial working directory is the default directory.
The interface presented by 'Host' is a lowest common denominator. The objective is not to expose all the functionality of any host; rather it is to provide an interface that can be used on many hosts.
|
|||
Executable An 'Executable' is a simple redirected executable. |
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
kind = "host" A string giving kind of extension is implemented by the class. |
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Construct a new 'Extension'. 'args': Keyword arguments providing values for Extension parameters. The values should be appropriate for the corresponding fields. Derived classes must pass along any unrecognized keyword arguments to this method so that additional arguments can be added in the future without necessitating changes to derived classes. This method will place all of the arguments into this objects instance dictionary. Derived classes may override this method, but should call this method during their processing.
|
Run a program on the remote host. 'path' -- The name of the program to run, on the remote host. If 'relative' is true, or if 'path' is not an absolute path but does contain at least one directory separator, then 'path' is interpreted relative to the default directory. Otherwise, 'path' is used unmodified. 'arguments' -- The sequence of arguments that should be passed to the program. 'environment' -- If not 'None', a dictionary of pairs of strings to add to the environment of the running program. 'timeout' -- The number of seconds the program is permitted to execute. After the 'timeout' expires, the program will be terminated. However, in some cases (such as when using 'rsh') it will be the local side of the connection that is closed. The remote side of the connection may or may not continue to operate, depending on the vagaries of the remote operating system. returns -- A pair '(status, output)'. The 'status' is the exit status returned by the program, or 'None' if the exit status is not available. The 'output' is a string giving the combined standard output and standard error output from the program. |
Copy 'local_file' to 'remote_file'. 'local_file' -- The name of the file on the local machine. 'remote_file' -- The name of the file on the remote machine. The 'remote_file' must be a relative path. It is interpreted relative to the default directory. If 'None', the 'remote_file' is placed in the default directory using the basename of the 'local_file'. If the 'local_file' and 'remote_file' are the same, then this function succeeds, but takes no action. |
Copy 'remote_file' to 'local_file'. 'remote_file' -- The name of the file on the remote machine. The 'remote_file' must be a relative path. It is interpreted relative to the default directory. 'local_file' -- The name of the file on the local machine. If 'None', the 'local_file' is placed in the current directory using the basename of the 'remote_file'. If the 'local_file' and 'remote_file' are the same, then this function succeeds, but takes no action. |
Run a program on the remote host. 'path' -- The name of the program to run, as a path on the local machine. 'arguments' -- As for 'Run'. 'environment' -- As for 'Run'. 'timeout' -- As for 'Run'. returns -- As for 'Run'. The program is uploaded to the default directory on the remote host, run, and then deleted. |
Delete the 'remote_file'. 'remote_file' -- A relative path to the file to be deleted. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:40 2011 | http://epydoc.sourceforge.net |