Author: Sean Gillies Version: 1.0
This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.
class bresenham: | |
def __init__(self, start, end): | |
self.start = list(start) | |
self.end = list(end) | |
self.path = [] | |
self.steep = abs(self.end[1]-self.start[1]) > abs(self.end[0]-self.start[0]) | |
if self.steep: | |
print 'Steep' |
def FtpRmTree(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 |
import os | |
import configparser as cp | |
import shutil | |
import pysftp | |
import paramiko | |
from paramiko.py3compat import decodebytes | |
# credentials file name | |
CREDENTIALS_FILE = 'sftp_sync_credentials.properties' |
Step-by-step (uncomplete) tutorial for setting up a base Python library given the following requirements: