Did I find the right examples for you? yes no

All Samples(522)  |  Call(0)  |  Derive(0)  |  Import(522)
An FTP client class and some helper functions.

Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds

Example:

>>> from ftplib import FTP
>>> ftp = FTP('ftp.python.org') # connect to host, default port
>>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@
'230 Guest login ok, access restrictions apply.'(more...)

src/p/y/pydanny-event-notes-HEAD/Pycon2009/internet/examples/ch17/getLatestFTP.py   pydanny-event-notes(Download)
#!/usr/bin/env python
 
import ftplib
import os
import socket

src/v/i/Violent-Python-Examples-HEAD/Chapter-2/4-massCompromise.py   Violent-Python-Examples(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
import ftplib
import optparse
import time

src/v/i/Violent-Python-Examples-HEAD/Chapter-2/4-injectPage.py   Violent-Python-Examples(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
 
import ftplib
 

src/v/i/Violent-Python-Examples-HEAD/Chapter-2/4-defaultPages.py   Violent-Python-Examples(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
import ftplib
 
 

src/v/i/Violent-Python-Examples-HEAD/Chapter-2/4-bruteLogin.py   Violent-Python-Examples(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
 
import ftplib, time
 

src/v/i/Violent-Python-Examples-HEAD/Chapter-2/4-anonLogin.py   Violent-Python-Examples(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
 
import ftplib
 

src/p/y/pydroid-HEAD/src/pydroid/framework/project_skeleton/libs/python27/lib/python2.7/urllib.py   pydroid(Download)
        host = socket.gethostbyname(host)
        if not port:
            import ftplib
            port = ftplib.FTP_PORT
        else:
def ftperrors():
    """Return the set of errors raised by the FTP class."""
    global _ftperrors
    if _ftperrors is None:
        import ftplib
    def init(self):
        import ftplib
        self.busy = 0
        self.ftp = ftplib.FTP()
        self.ftp.connect(self.host, self.port, self.timeout)
    def retrfile(self, file, type):
        import ftplib
        self.endtransfer()
        if type in ('d', 'D'): cmd = 'TYPE A'; isdir = 1
        else: cmd = 'TYPE ' + type; isdir = 0

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/urllib.py   main(Download)
        host = socket.gethostbyname(host)
        if not port:
            import ftplib
            port = ftplib.FTP_PORT
        else:
def ftperrors():
    """Return the set of errors raised by the FTP class."""
    global _ftperrors
    if _ftperrors is None:
        import ftplib
    def init(self):
        import ftplib
        self.busy = 0
        self.ftp = ftplib.FTP()
        self.ftp.connect(self.host, self.port, self.timeout)
    def retrfile(self, file, type):
        import ftplib
        self.endtransfer()
        if type in ('d', 'D'): cmd = 'TYPE A'; isdir = 1
        else: cmd = 'TYPE ' + type; isdir = 0

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/urllib.py   main(Download)
        host = socket.gethostbyname(host)
        if not port:
            import ftplib
            port = ftplib.FTP_PORT
        else:
def ftperrors():
    """Return the set of errors raised by the FTP class."""
    global _ftperrors
    if _ftperrors is None:
        import ftplib
    def init(self):
        import ftplib
        self.busy = 0
        self.ftp = ftplib.FTP()
        self.ftp.connect(self.host, self.port, self.timeout)
    def retrfile(self, file, type):
        import ftplib
        self.endtransfer()
        if type in ('d', 'D'): cmd = 'TYPE A'; isdir = 1
        else: cmd = 'TYPE ' + type; isdir = 0

src/l/o/LODGrefine-HEAD/lod2-google-refine/extensions/jython/module/MOD-INF/lib/jython/urllib.py   LODGrefine(Download)
        host = socket.gethostbyname(host)
        if not port:
            import ftplib
            port = ftplib.FTP_PORT
        else:
def ftperrors():
    """Return the set of errors raised by the FTP class."""
    global _ftperrors
    if _ftperrors is None:
        import ftplib
    def init(self):
        import ftplib
        self.busy = 0
        self.ftp = ftplib.FTP()
        self.ftp.connect(self.host, self.port)
    def retrfile(self, file, type):
        import ftplib
        self.endtransfer()
        if type in ('d', 'D'): cmd = 'TYPE A'; isdir = 1
        else: cmd = 'TYPE ' + type; isdir = 0

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next