examples/example_22_saga_python/start_saga.py
def download_file(filename, session):
    """ Downloads a file """
    print('Downloading file %s' % filename)
    infilesource = os.path.join('sftp://' + ADDRESS + WORKING_DIR,
                                 filename)
    infiletarget = os.path.join(os.getcwd(), filename)
    incoming = saga.filesystem.File(infilesource, session=session, flags=OVERWRITE)
    incoming.copy(infiletarget)
    print('Transfer of `%s` to `%s` successful' % (filename, infiletarget))
def download_file(filename, session):
    """ Downloads a file """
    print('Downloading file %s' % filename)
    infilesource = os.path.join('sftp://' + ADDRESS + WORKING_DIR,
                                 filename)
    infiletarget = os.path.join(os.getcwd(), filename)
    incoming = saga.filesystem.File(infilesource, session=session, flags=OVERWRITE)
    incoming.copy(infiletarget)
    print('Transfer of `%s` to `%s` successful' % (filename, infiletarget))
def download_file ( filename , session ) : print ( 'Downloading file %s' % filename ) infilesource = os . path . join ( 'sftp://' + ADDRESS + WORKING_DIR , filename ) infiletarget = os . path . join ( os . getcwd ( ) , filename ) incoming = saga . filesystem . File ( infilesource , session = session , flags = OVERWRITE ) incoming . copy ( infiletarget ) print ( 'Transfer of `%s` to `%s` successful' % ( filename , infiletarget ) )
Downloads a file
Downloads a file