examples/example_22_saga_python/start_saga.py
def upload_file(filename, session):
    """ Uploads a file """
    print('Uploading file %s' % filename)
    outfilesource = os.path.join(os.getcwd(), filename)
    outfiletarget = 'sftp://' + ADDRESS + WORKING_DIR
    out = saga.filesystem.File(outfilesource, session=session, flags=OVERWRITE)
    out.copy(outfiletarget)
    print('Transfer of `%s` to `%s` successful' % (filename, outfiletarget))
def upload_file(filename, session):
    print('Uploading file %s' % filename)
    outfilesource = os.path.join(os.getcwd(), filename)
    outfiletarget = 'sftp://' + ADDRESS + WORKING_DIR
    out = saga.filesystem.File(outfilesource, session=session, flags=OVERWRITE)
    out.copy(outfiletarget)
    print('Transfer of `%s` to `%s` successful' % (filename, outfiletarget))
def upload_file ( filename , session ) : print ( 'Uploading file %s' % filename ) outfilesource = os . path . join ( os . getcwd ( ) , filename ) outfiletarget = 'sftp://' + ADDRESS + WORKING_DIR out = saga . filesystem . File ( outfilesource , session = session , flags = OVERWRITE ) out . copy ( outfiletarget ) print ( 'Transfer of `%s` to `%s` successful' % ( filename , outfiletarget ) )
Uploads a file
Uploads a file