Package qm :: Package test :: Package classes :: Module local_host :: Class LocalHost
[hide private]
[frames] | no frames]

Class LocalHost

source code

         object --+        
                  |        
extension.Extension --+    
                      |    
              host.Host --+
                          |
                         LocalHost

A 'LocalHost' is the machine on which Python is running.

The default directory for a 'LocalHost' is the current working directory for this Python process.

Nested Classes [hide private]

Inherited from host.Host: Executable

Inherited from extension.Extension: Type, __metaclass__

Instance Methods [hide private]
 
UploadFile(self, local_file, remote_file=None)
Copy 'local_file' to 'remote_file'.
source code
 
UploadAndRun(self, path, arguments, environment=None, timeout=-1)
Run a program on the remote host.
source code
 
DownloadFile(self, remote_file, local_file=None)
Copy 'remote_file' to 'local_file'.
source code
 
_SameFile(self, file1, file2)
Return true iff 'file1' and 'file2' are the same file.
source code
 
DeleteFile(self, remote_file)
Delete the 'remote_file'.
source code

Inherited from host.Host: Run, __init__

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from host.Host: kind

Inherited from extension.Extension: arguments

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

UploadFile(self, local_file, remote_file=None)

source code 

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.

Overrides: host.Host.UploadFile
(inherited documentation)

UploadAndRun(self, path, arguments, environment=None, timeout=-1)

source code 

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.

Overrides: host.Host.UploadAndRun
(inherited documentation)

DownloadFile(self, remote_file, local_file=None)

source code 

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.

Overrides: host.Host.DownloadFile
(inherited documentation)

_SameFile(self, file1, file2)

source code 

Return true iff 'file1' and 'file2' are the same file.

returns -- True iff 'file1' and 'file2' are the same file, even if they have different names.

DeleteFile(self, remote_file)

source code 

Delete the 'remote_file'.

'remote_file' -- A relative path to the file to be deleted.

Overrides: host.Host.DeleteFile
(inherited documentation)