class documentation

class StdioClient(basic.LineReceiver): (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method cmd_​CD Undocumented
Method cmd_​CHGRP Undocumented
Method cmd_​CHMOD Undocumented
Method cmd_​CHOWN Undocumented
Method cmd_​EXEC Run rest using the user's shell (or /bin/sh if they do not have one).
Method cmd_​EXIT Undocumented
Method cmd_​GET Undocumented
Method cmd_​HELP Undocumented
Method cmd_​LCD Undocumented
Method cmd_​LLS Undocumented
Method cmd_​LMKDIR Undocumented
Method cmd_​LN Undocumented
Method cmd_​LPWD Undocumented
Method cmd_​LS Undocumented
Method cmd_​MKDIR Undocumented
Method cmd_​PROGRESS Undocumented
Method cmd_​PUT Do an upload request for a single local file or a globing expression.
Method cmd_​PWD Undocumented
Method cmd_​RENAME Undocumented
Method cmd_​RM Undocumented
Method cmd_​RMDIR Undocumented
Method cmd_​VERSION Undocumented
Method connection​Made Called when a connection is made.
Method line​Received Override this for when each line is received.
Class Variable delimiter Undocumented
Class Variable ps Undocumented
Instance Variable client Undocumented
Instance Variable current​Directory Undocumented
Instance Variable file Undocumented
Instance Variable ignore​Errors Undocumented
Instance Variable use​Progress​Bar Undocumented
Method _abbrev​Size Undocumented
Method _abbrev​Time Undocumented
Method _cb​Cd Undocumented
Method _cb​Command Undocumented
Method _cb​Cur​Dir Undocumented
Method _cb​Display​Files Undocumented
Method _cb​Get​Done Undocumented
Method _cb​Get​File​Size Undocumented
Method _cb​Get​Multiple Undocumented
Method _cb​Get​Multiple​Next Undocumented
Method _cb​Get​Open​File Undocumented
Method _cb​Get​Read Undocumented
Method _cb​Open​List Undocumented
Method _cb​Put​Done Undocumented
Method _cb​Put​Multiple​Next Perform an upload for the next file in the list of local files.
Method _cb​Put​Open​File Undocumented
Method _cb​Put​Write Undocumented
Method _cb​Read​File Undocumented
Method _cb​Set​Cur​Dir Undocumented
Method _cb​Set​Usr​Grp Undocumented
Method _dispatch​Command Undocumented
Method _eb​Close​Lf Undocumented
Method _eb​Command Undocumented
Method _eb​Not​ADirectory Undocumented
Method _get​Filename Parse line received as command line input and return first filename together with the remaining line.
Method _get​Next​Chunk Undocumented
Method _new​Line Undocumented
Method _print​Failure Undocumented
Method _print​Progress​Bar No summary
Method _put​Multiple​Files Perform an upload for a list of local files.
Method _put​Remote​File Do an upload request.
Method _put​Single​File Perform an upload for a single file.
Method _remote​Glob Undocumented
Method _write​To​Transport Undocumented

Inherited from LineReceiver:

Method clear​Line​Buffer Clear buffered data.
Method data​Received Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.)
Method line​Length​Exceeded Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.
Method raw​Data​Received Override this for when raw data is received.
Method send​Line Sends a line to the other end of the connection.
Method set​Line​Mode Sets the line-mode of this receiver.
Method set​Raw​Mode Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than lineReceived.
Constant MAX​_LENGTH The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped). Default is 16384.
Instance Variable line​_mode Undocumented
Instance Variable _buffer Undocumented
Instance Variable _busy​Receiving Undocumented

Inherited from Protocol (via LineReceiver):

Method connection​Lost Called when the connection is shut down.
Method log​Prefix Return a prefix matching the class name, to identify log messages related to this protocol instance.
Class Variable factory Undocumented

Inherited from BaseProtocol (via LineReceiver, Protocol):

Method make​Connection Make a connection to a transport and a server.
Instance Variable connected Undocumented
Instance Variable transport Undocumented

Inherited from _PauseableMixin (via LineReceiver):

Method pause​Producing Undocumented
Method resume​Producing Undocumented
Method stop​Producing Undocumented
Instance Variable paused Undocumented
def __init__(self, client, f=None): (source)

Undocumented

def cmd_CD(self, path): (source)

Undocumented

def cmd_CHGRP(self, rest): (source)

Undocumented

def cmd_CHMOD(self, rest): (source)

Undocumented

def cmd_CHOWN(self, rest): (source)

Undocumented

def cmd_EXEC(self, rest): (source)
Run rest using the user's shell (or /bin/sh if they do not have one).
def cmd_EXIT(self, ignored): (source)

Undocumented

def cmd_GET(self, rest): (source)

Undocumented

def cmd_HELP(self, ignored): (source)

Undocumented

def cmd_LCD(self, path): (source)

Undocumented

def cmd_LLS(self, rest): (source)

Undocumented

def cmd_LMKDIR(self, path): (source)

Undocumented

def cmd_LN(self, rest): (source)

Undocumented

def cmd_LPWD(self, ignored): (source)

Undocumented

def cmd_LS(self, rest): (source)

Undocumented

def cmd_MKDIR(self, path): (source)

Undocumented

def cmd_PROGRESS(self, ignored): (source)

Undocumented

def cmd_PUT(self, rest): (source)
Do an upload request for a single local file or a globing expression.
Parameters
rest:strRequested command line for the PUT command.
Returns
defer.DeferredA deferred which fires with None when transfer is done.
def cmd_PWD(self, ignored): (source)

Undocumented

def cmd_RENAME(self, rest): (source)

Undocumented

def cmd_RM(self, path): (source)

Undocumented

def cmd_RMDIR(self, path): (source)

Undocumented

def cmd_VERSION(self, ignored): (source)

Undocumented

def connectionMade(self): (source)

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

def lineReceived(self, line): (source)
Override this for when each line is received.
Parameters
line:bytesThe line which was received with the delimiter removed.

Undocumented

client = (source)

Undocumented

currentDirectory = (source)

Undocumented

file = (source)

Undocumented

ignoreErrors: int = (source)

Undocumented

useProgressBar = (source)

Undocumented

def _abbrevSize(self, size): (source)

Undocumented

def _abbrevTime(self, t): (source)

Undocumented

def _cbCd(self, directory): (source)

Undocumented

def _cbCommand(self, result): (source)

Undocumented

def _cbCurDir(self, path): (source)

Undocumented

def _cbDisplayFiles(self, files, options): (source)

Undocumented

def _cbGetDone(self, ignored, rf, lf): (source)

Undocumented

def _cbGetFileSize(self, attrs, rf, lf): (source)

Undocumented

def _cbGetMultiple(self, files, local): (source)

Undocumented

def _cbGetMultipleNext(self, res, files, local): (source)

Undocumented

def _cbGetOpenFile(self, rf, lf): (source)

Undocumented

def _cbGetRead(self, data, rf, lf, chunks, start, size, startTime): (source)

Undocumented

def _cbOpenList(self, directory, glob): (source)

Undocumented

def _cbPutDone(self, ignored, rf, lf): (source)

Undocumented

def _cbPutMultipleNext(self, previousResult, files, remotePath, single=False): (source)
Perform an upload for the next file in the list of local files.
Parameters
previous​Result:strResult form previous file form the list.
files:list of strList of local files.
remote​Path:strRemote path for the request relative to current working directory.
single:boolA flag which signals if this is a transfer for a single file in which case we use the exact remote path
Returns
A deferred which fires when transfer is done.
def _cbPutOpenFile(self, rf, lf): (source)

Undocumented

def _cbPutWrite(self, ignored, rf, lf, chunks, startTime): (source)

Undocumented

def _cbReadFile(self, files, matchedFiles, directory, glob): (source)

Undocumented

def _cbSetCurDir(self, path): (source)

Undocumented

def _cbSetUsrGrp(self, attrs, path, usr=None, grp=None): (source)

Undocumented

def _dispatchCommand(self, line): (source)

Undocumented

def _ebCloseLf(self, f, lf): (source)

Undocumented

def _ebCommand(self, f): (source)

Undocumented

def _ebNotADirectory(self, reason, path, glob): (source)

Undocumented

def _getFilename(self, line): (source)
Parse line received as command line input and return first filename together with the remaining line.
Parameters
line:strArguments received from command line input.
Returns
tuppleTupple with filename and rest. Return empty values when no path was not found.
def _getNextChunk(self, chunks): (source)

Undocumented

def _newLine(self): (source)

Undocumented

def _printFailure(self, f): (source)

Undocumented

def _printProgressBar(self, f, startTime): (source)
Update a console progress bar on this StdioClient's transport, based on the difference between the start time of the operation and the current time according to the reactor, and appropriate to the size of the console window.
Parameters
f:FileWrappera wrapper around the file which is being written or read
start​Time:floatThe time at which the operation being tracked began.
def _putMultipleFiles(self, files, remote): (source)
Perform an upload for a list of local files.
Parameters
files:list of str.List of local files.
remote:strRemote path for the request relative to current working directory.
Returns
A deferred which fires when transfer is done.
def _putRemoteFile(self, localStream, remotePath): (source)
Do an upload request.
Parameters
local​Stream:File like object.Local stream from where data is read.
remote​Path:strRemote path for the request relative to current working directory.
Returns
A deferred which fires when transfer is done.
def _putSingleFile(self, local, remote): (source)
Perform an upload for a single file.
Parameters
local:str.Path to local file.
remote:strRemote path for the request relative to current working directory.
Returns
A deferred which fires when transfer is done.
def _remoteGlob(self, fullPath): (source)

Undocumented

def _writeToTransport(self, msg): (source)

Undocumented