def copy(filename, rhost, dest): '''copy 'file' object to target destination Inputs: filename -- path string of source 'file' rhost -- hostname of destination target destination -- path string for destination target ''' from LauncherSCP import LauncherSCP copier = LauncherSCP('copy_%s' % filename) logging.info('executing {scp %s %s:%s}', filename, rhost, dest) copier.stage(options='-q', source=filename, destination=rhost+':'+dest) copier.launch() return
def copy(file, rhost, dest): '''copy 'file' object to target destination Inputs: source -- path string of source 'file' rhost -- hostname of destination target destination -- path string for destination target ''' from LauncherSCP import LauncherSCP copier = LauncherSCP('copy_%s' % file) #print 'executing {scp %s %s:%s}' % (file,rhost,dest) copier.stage(options='-q', source=file, destination=rhost + ':' + dest) copier.launch() return