/lftppy

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

lftppy

A python lftp wrapper.

  • Tested against lftp 4.6.0 on Centos 6.4

Install

Example Usage


import lftppy
# create process
process = lftp.LFTP(hostname, port, username, password)
# mirror directory, put process in the background
process.mirror(dir_name, target_dir, background=True)
# get single file
result = process.get(filename)
# delete file
result = process.rm(filename)
# get latest output from running jobs
jobs = process.jobs
for idx, job in jobs.iteritems():
	print job

Testing

  • run all tests
    • $ nosetests
  • run a single test
    • $ nosetests tests.testlftp.FTPServerBase