Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cbd449b4
Commit
cbd449b4
authored
Oct 05, 2012
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The file obj passed to ftp.storbinary/storlines must be opened in binary mode.
parent
8cf1cc49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
Doc/library/ftplib.rst
Doc/library/ftplib.rst
+9
-9
No files found.
Doc/library/ftplib.rst
View file @
cbd449b4
...
...
@@ -259,12 +259,12 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
.. method:: FTP.storbinary(cmd, file, blocksize=8192, callback=None, rest=None)
Store a file in binary transfer mode. *cmd* should be an appropriate
``STOR`` command: ``"STOR filename"``. *file* is a
n open
:term:`file object`
which is read until EOF using its :meth:`read` method in blocks of size
*blocksize* to provide the data to be stored. The *blocksize* argument
defaults to 8192. *callback* is an optional single parameter callable that
is called on each block of data after it is sent. *rest* means the same thing
as in the :meth:`transfercmd` method.
``STOR`` command: ``"STOR filename"``. *file* is a :term:`file object`
(opened in binary mode) which is read until EOF using its :meth:`read`
method in blocks of size *blocksize* to provide the data to be stored.
The *blocksize* argument defaults to 8192. *callback* is an optional single
parameter callable that is called on each block of data after it is sent.
*rest* means the same thing
as in the :meth:`transfercmd` method.
.. versionchanged:: 3.2
*rest* parameter added.
...
...
@@ -274,9 +274,9 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
Store a file in ASCII transfer mode. *cmd* should be an appropriate
``STOR`` command (see :meth:`storbinary`). Lines are read until EOF from the
open :term:`file object` *file* using its :meth:`readline` method to provide
the data to be stored. *callback* is an optional single parameter callab
le
that is called on each line after it is sent.
:term:`file object` *file* (opened in binary mode) using its :meth:`readline`
method to provide the data to be stored. *callback* is an optional sing
le
parameter callable
that is called on each line after it is sent.
.. method:: FTP.transfercmd(cmd, rest=None)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment