Lines Matching +full:07 +full:- +full:callback
13 drwxr-xr-x 8 root wheel 1024 Jan 3 1994 .
14 drwxr-xr-x 8 root wheel 1024 Jan 3 1994 ..
15 drwxr-xr-x 2 root wheel 1024 Jan 3 1994 bin
16 drwxr-xr-x 2 root wheel 1024 Jan 3 1994 etc
17 d-wxrwxr-x 2 ftp wheel 1024 Sep 5 13:43 incoming
18 drwxr-xr-x 2 root wheel 1024 Nov 17 1993 lib
19 drwxr-xr-x 6 1094 wheel 1024 Sep 13 19:07 pub
20 drwxr-xr-x 3 root wheel 1024 Jan 3 1994 usr
21 -rw-r--r-- 1 root root 312 Aug 1 1994 welcome.msg
28 python ftplib.py -d localhost -l -p -l
61 class error_proto(Error): pass # response does not begin with [1-5]
85 The last parameter is the encoding of filenames, which defaults to utf-8.
111 encoding='utf-8'):
139 def connect(self, host='', port=0, timeout=-999, source_address=None):
141 - host: hostname to connect to (string, default previous host)
142 - port: port to connect to (integer, default previous port)
143 - timeout: the timeout to set against the ftp socket(s)
144 - source_address: a 2-tuple (host, port) for the socket to bind
151 if timeout != -999:
154 raise ValueError('Non-blocking socket (timeout=0) is not supported')
191 s = s[:5] + '*'*(i-5) + s[i:]
219 if line[-2:] == CRLF:
220 line = line[:-2]
221 elif line[-1:] in CRLF:
222 line = line[:-1]
231 if line[3:4] == '-':
237 nextline[3:4] != '-':
265 '''Abort a file transfer. Uses out-of-band data.
325 """Internal: Does the PASV or EPSV handshake -> (address, port)"""
403 if user == 'anonymous' and passwd in {'', '-'}:
407 # - We want to remain anonymous
408 # - We want to stop SPAM
409 # - We don't want to let ftp sites to discriminate by the user,
421 def retrbinary(self, cmd, callback, blocksize=8192, rest=None): argument
426 callback: A single parameter callable to be called on each
441 callback(data)
447 def retrlines(self, cmd, callback = None): argument
452 callback: An optional single parameter callable that is called
459 if callback is None:
460 callback = print_line
472 if line[-2:] == CRLF:
473 line = line[:-2]
474 elif line[-1:] == '\n':
475 line = line[:-1]
476 callback(line)
482 def storbinary(self, cmd, fp, blocksize=8192, callback=None, rest=None): argument
487 fp: A file-like object with a read(num_bytes) method.
490 callback: An optional single parameter callable that is called on
504 if callback:
505 callback(buf)
511 def storlines(self, cmd, fp, callback=None): argument
516 fp: A file-like object with a readline() method.
517 callback: An optional single parameter callable that is called on
531 if buf[-2:] != B_CRLF:
532 if buf[-1] in B_CRLF: buf = buf[:-1]
535 if callback:
536 callback(buf)
559 Optional last argument is callback function; all
560 non-empty arguments before it are concatenated to the
564 if args[-1:] and type(args[-1]) != type(''):
565 args, func = args[:-1], args[-1]
573 command (RFC-3659). If path is omitted the current directory
594 for fact in facts_found[:-1].split(";"):
629 # The SIZE command is defined in RFC-3659
638 # fix around non-compliant implementations such as IIS shipped
651 # fix around non-compliant implementations such as IIS shipped
685 in RFC-4217.
702 drwxr-xr-x 8 root wheel 1024 Jan 3 1994 .
703 drwxr-xr-x 8 root wheel 1024 Jan 3 1994 ..
704 drwxr-xr-x 2 root wheel 1024 Jan 3 1994 bin
705 drwxr-xr-x 2 root wheel 1024 Jan 3 1994 etc
706 d-wxrwxr-x 2 ftp wheel 1024 Sep 5 13:43 incoming
707 drwxr-xr-x 2 root wheel 1024 Nov 17 1993 lib
708 drwxr-xr-x 6 1094 wheel 1024 Sep 13 19:07 pub
709 drwxr-xr-x 3 root wheel 1024 Jan 3 1994 usr
710 -rw-r--r-- 1 root root 312 Aug 1 1994 welcome.msg
721 encoding='utf-8'):
761 '''Switch back to a clear-text control connection.'''
771 # Though RFC-2228 defines four possible protection levels,
772 # RFC-4217 only recommends two, Clear and Private.
774 # data-channel, Private (PROT P) means that the data-channel
790 # --- Overridden FTP methods
864 if resp[left + 1] != resp[right - 1]:
897 '''Default retrlines callback to print a line.'''
902 '''Copy file from one FTP-instance to another.'''
925 Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ...
927 -d dir
928 -l list
929 -p password
940 while sys.argv[1] == '-d':
943 if sys.argv[1][:2] == '-r':
956 " -- using anonymous login.")
963 "No account -- using anonymous login.")
966 if file[:2] == '-l':
968 elif file[:2] == '-d':
972 elif file == '-p':