diff options
author | Robey Pointer <robey@lag.net> | 2005-04-21 16:59:03 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2005-04-21 16:59:03 +0000 |
commit | bcf197d02731b9548954a6c8dcad1bb290751439 (patch) | |
tree | 94431ec4f438254123765f80c30f27e9e1c20fbb | |
parent | fc7ccdf834ac60557d28b40f91b8c245c9c7fa91 (diff) |
[project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-3]
make SFTPClient.file an alias for SFTPClient.open.
clean up docs a little, and make 'file' an alias for 'open'.
this is how python is heading in general.
-rw-r--r-- | paramiko/sftp_client.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 329667ca..b29f71e7 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -148,12 +148,16 @@ class SFTPClient (BaseSFTP): is ignored, since SSH treats all files as binary. The C{'U'} flag is supported in a compatible way. + The file will be buffered in standard python style by default, but + can be altered with the C{bufsize} parameter. C{0} turns off + buffering, C{1} uses line buffering, and any number greater than 1 + (C{>1}) uses that specific buffer size. + @param filename: name of the file to open. @type filename: string @param mode: mode (python-style) to open in. @type mode: string - @param bufsize: desired buffering (-1 = default buffer size, 0 = - unbuffered, 1 = line buffered, >1 = requested buffer size). + @param bufsize: desired buffering (-1 = default buffer size) @type bufsize: int @return: a file object representing the open file. @rtype: SFTPFile @@ -176,6 +180,10 @@ class SFTPClient (BaseSFTP): handle = msg.get_string() return SFTPFile(self, handle, mode, bufsize) + # python has migrated toward file() instead of open(). + # and really, that's more easily identifiable. + file = open + def remove(self, path): """ Remove the file at the given path. |