summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
Commit message (Collapse)AuthorAgeFilesLines
* socket.error inherits from IOError, it no longer needs listing inGregory P. Smith2008-04-121-1/+1
| | | | the all_errors tuple.
* docstring and comment updates suggested by Giampaolo Rodola'Gregory P. Smith2008-01-221-3/+3
|
* accepts and closes issue #1221598: adds an optional callback to ftplib.FTPGregory P. Smith2008-01-221-17/+52
| | | | storbinary() and storlines() methods.
* FTP.ntransfercmd method now uses create_connection when passive,Facundo Batista2007-06-061-3/+1
| | | | using the timeout received in connection time.
* Whitespace normalization. Ugh, we really need to do this more often.Neal Norwitz2007-04-251-2/+2
| | | | You might want to review this change as it's my first time. Be gentle. :-)
* Added the posibility to pass the timeout to FTP.connect, not only whenFacundo Batista2007-03-301-1/+3
| | | | instantiating the class. Docs and tests are updated.
* Forgot to add the file before the previous commit, here goFacundo Batista2007-03-261-25/+23
| | | | the ftplib tests.
* Whitespace normalization.Tim Peters2007-01-301-2/+2
|
* Patch #1359217: Ignore 2xx response before 150 response.Martin v. Löwis2006-11-121-0/+11
| | | | Will backport to 2.5.
* SF bug #1168983: ftplib.py string index out of rangeRaymond Hettinger2005-04-051-7/+16
| | | | | | | | * resp[:1] in '123' # after Py2.2, this allowed blank responses to pass. * replace <> with != * provide a usage message for empty command line calls Backport candidate.
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-4/+4
| | | | From SF patch #852334.
* Fix a regression from the 1.68->1.69 checkin:Walter Dörwald2002-06-031-1/+1
| | | | string.split(foo, bar) must be foo.split(bar) instead of bar.split(foo).
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-3/+3
|
* Replace boolean test with is NoneRaymond Hettinger2002-06-011-1/+1
|
* Use string methods where possible, and remove import stringNeal Norwitz2002-05-311-6/+5
|
* Closes SF patch 553277. Per GvR, reverting to original patch -- the way toRaymond Hettinger2002-05-121-1/+1
| | | | | | test if 'callable' has not been supplied is to test for None instead of False. The previous correction to 'if callable()' was wrong because an unusable callback would be ignored rather than raising an exception.
* Patch #553277: Accept callbacks that are callable, not callbacks that are true.Martin v. Löwis2002-05-081-1/+1
|
* Access the exception argument to see whether it starts with '500'.Martin v. Löwis2002-03-101-2/+2
| | | | Fixes #527855.
* The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.Martin v. Löwis2002-02-161-4/+4
| | | | | Replaces calls to socket.send() (which isn't guaranteed to send all data) with the new socket.sendall() method.
* Whitespace normalization.Tim Peters2002-02-161-7/+7
|
* Update the docstring too. :-)Guido van Rossum2001-12-281-1/+1
|
* SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous passwordGuido van Rossum2001-12-281-13/+8
| | | | | | Instead of sending the real user and host, use "anonymous@" (i.e. no host name at all!) as the default anonymous FTP password. This avoids privacy violations.
* Don't set passiveserver to 0 in connect(). See SF bug #495693.Guido van Rossum2001-12-231-1/+0
| | | | | This should definitely be backported to 2.2.1. I'll leave it to Jack to decide whether he wants to fix this in MacPython 2.2.
* Oops. Catching OverflowError from int() doesn't help, since it raisesGuido van Rossum2001-10-171-2/+2
| | | | ValueError on too-large inputs.
* Fix SF bug #459767: ftplib fails with files > 2GBGuido van Rossum2001-10-161-5/+13
| | | | | size(), parse150(): try int() first, catch OverflowError, fall back to long().
* Only close sockets if they have been created. Reported by Blake Winton.Martin v. Löwis2001-10-071-2/+5
|
* Change the 227 response parser to use a more liberal regularGuido van Rossum2001-08-171-7/+9
| | | | | | | | expression. This is needed for certain servers that (in violation of the standard) don't return the parentheses in the response. This fixes SF bug #441712 by Henrik Weber (not exactly using his patch).
* Initialize msg to avoid unbound locals.Martin v. Löwis2001-07-311-0/+2
|
* Untabify IPv6 changes.Martin v. Löwis2001-07-261-66/+66
|
* Patch #401196: Use getaddrinfo and AF_INET6 in TCP servers and clients.Martin v. Löwis2001-07-241-22/+90
|
* remove global decl about unused variableJeremy Hylton2001-04-091-1/+0
|
* Move some constant initialization from FTP.__init__() and FTP.connect()Fred Drake2001-02-281-16/+16
| | | | | | | | to the class namespace. Allow FTP.close() to be called more than once without tossing cookies. (This seems to be a fairly common idiom for .close() methods, so let's try to be consistent.)
* Provide a default for the blocksize arg of storbinary().Guido van Rossum2001-02-151-1/+1
| | | | SF patch #103517 by mfx.
* String method conversion.Eric S. Raymond2001-02-091-13/+13
|
* more __all__ updatesSkip Montanaro2001-01-201-0/+1
|
* Default to passive mode. See SF bug #126851.Guido van Rossum2001-01-151-1/+1
| | | | | | This is slightly controversial, but after reading the argumentation in the bug tracker for and against, I believe this is the right solution. Let me know if it breaks for you, and how.
* Whitespace normalization.Tim Peters2001-01-141-635/+635
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-12/+12
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Added support for RFC 959's REST command (restart), closing SF patchBarry Warsaw2000-09-011-23/+38
| | | | | | | | | | | | | | | | | | | | #101187, which some modifications. Specifically, ntransfercmd(), transfercmd(), and retrbinary() all grow an optional `rest' argument, which if not None, is used as the argument to an FTP REST comman dbefore the socket is returned. Differences from the SF patch: - always compare against None with `is' or `is not' instead of == or != - no parens around conditional - RFC 959 defines the argument to REST is a string containing any ASCII characters in the range [33..126]. Therefore, we use the %s format character instead of %f or %d as suggested in the patch's comments. Note that we do /not/ sanity checkthe contents of the rest argument (but we'll document this in the library reference manual).
* Convert some old-style string exceptions to class exceptions.Fred Drake2000-08-171-6/+6
|
* updated occurences of fqdn algorithm (closes patch #101197)Peter Schneider-Kamp2000-08-161-12/+4
|
* Fredrik Lundh:Guido van Rossum2000-03-281-2/+2
| | | | | This fixes a bunch of socket.connect(host, post) calls. Note that I haven't tested all modules -- I don't have enough servers here...
* Simple changes by Gerrit Holl - move author acknowledgements out ofGuido van Rossum2000-02-281-5/+5
| | | | docstrings into comments.
* Actually, the previous batch's comment should have been different;Guido van Rossum2000-02-041-2/+3
| | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Patches by Michael Reilly to correctly deal with ftp URLs of the formGuido van Rossum1999-08-181-0/+2
| | | | | ftp://user@host//root/path: the double slash in the pathname means to go to the root directory even if the initial directory isn't the root.
* FTP.dir(): Fix typo in docstring.Fred Drake1999-07-071-1/+1
|
* Add warning to Netrc's docstring that it is obsolete -- use the netrcGuido van Rossum1998-12-221-0/+2
| | | | | module instead. (The main advantage of the latter is that it comes with documentation.)
* Typo discovered by Just.Guido van Rossum1998-12-211-1/+1
|
* According to Robin Dunn, at least one FTP server returns 200 insteadGuido van Rossum1998-07-021-1/+1
| | | | of 250 on a successful delete.
* parse150(): Simplify RE used to parse the message a little, taking advantageFred Drake1998-04-271-2/+1
| | | | of using re instead of regex.