esm_archiving.external package

Submodules

esm_archiving.external.pypftp module

class esm_archiving.external.pypftp.Pftp(username=None, password=None)[source]

Bases: object

HOST = 'tape.dkrz.de'
PORT = 4021
close()[source]
cwd(path)[source]

change working directory

directories(path=None)[source]

gather directories at the given path

static download(source, destination)[source]

uses pftp binary for transfering the file

exists(path)[source]

check if a path exists

files(path=None)[source]

gather files at the given path

is_connected()[source]

check if the connection is still active

isdir(pathname)[source]

Returns true if pathname refers to an existing directory

isfile(pathname)[source]

Returns true if pathname refers to an existing file

listdir(path=None)

list directory contents

listing(path=None)[source]

list directory contents

listing2(path=None)[source]

directory listing in long form. similar to “ls -l”

makedirs(path)[source]

Recursively create dirs as required walking up to an existing parent dir

mkdir(path)[source]
mlsd(path)[source]
pwd()[source]

present working directory

quit()[source]
reconnect()[source]

reconnects to the ftp server

remove(filename)[source]
removedirs(path)[source]
rename(from_name, to_name)[source]
rmdir(path)[source]

remove directory

size(pathname)[source]

Returns size of path in bytes

stat(pathname)[source]

Returns stat of the path

static upload(source, destination)[source]

uses pftp binary for transfering the file

walk(path=None)[source]

recursively walk the directory tree from the given path. Similar to os.walk

walk_for_directories(path=None)[source]

recursively gather directories

walk_for_files(path=None)[source]

recursively gather files

esm_archiving.external.pypftp.download(source, destination)[source]
esm_archiving.external.pypftp.upload(source, destination)[source]