This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rmtree_ftp(ftp, path): | |
"""Recursively delete a directory tree on a remote server.""" | |
wd = ftp.pwd() | |
try: | |
names = ftp.nlst(path) | |
except ftplib.all_errors as e: | |
# some FTP servers complain when you try and list non-existent paths | |
#_log.debug('FtpRmTree: Could not remove {0}: {1}'.format(path, e)) | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Example Usage | |
============= | |
>>> import datetime | |
>>> start = datetime.date(2009, 6, 21) |