Package ssh :: Module channel :: Class ChannelFile
[frames] | no frames]

Class ChannelFile

source code

       object --+    
                |    
file.BufferedFile --+
                    |
                   ChannelFile

A file-like wrapper around Channel. A ChannelFile is created by calling Channel.makefile.


Bug: To correctly emulate the file object created from a socket's makefile method, a Channel and its ChannelFile should be able to be closed or garbage-collected independently. Currently, closing the ChannelFile does nothing but flush the buffer.

Instance Methods
 
__init__(self, channel, mode='r', bufsize=-1)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
str
__repr__(self)
Returns a string representation of this object, for debugging.
source code

Inherited from file.BufferedFile: __del__, __iter__, close, flush, next, read, readline, readlines, seek, tell, write, writelines, xreadlines

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables

Inherited from file.BufferedFile: FLAG_APPEND, FLAG_BINARY, FLAG_BUFFERED, FLAG_LINE_BUFFERED, FLAG_READ, FLAG_UNIVERSAL_NEWLINE, FLAG_WRITE, SEEK_CUR, SEEK_END, SEEK_SET

Properties

Inherited from object: __class__

Method Details

__init__(self, channel, mode='r', bufsize=-1)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

Returns a string representation of this object, for debugging.

Returns: str
Overrides: object.__repr__