Custom Query (120 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (13 - 15 of 120)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ticket Resolution Summary Owner Reporter
#119 fixed Allow "pathlike" objects for paths schwa ftputiluser
Description

It will be very useful to have a support for the Pathlib acts like input parameters for methods. E.g. you can do something like ftp_host.chdir(Path("/my/dir/"))

#118 duplicate In-memory downloads schwa ftputiluser
Description

Hi all,

As the title implies, it would be nice to be able to download a file in-memory. Currently I add the following method to ftputil.FTPHost:

def download_in_memory(self, source, callback=None):
    source = ftputil.tool.as_unicode(source)
    source_file = ftputil.file_transfer.RemoteFile(self, source, "rb")
    source_fobj = source_file.fobj()
    target_fobj = io.BytesIO()
    bytes_buffer = None

    try:
        try:
            ftputil.file_transfer.copyfileobj(source_fobj, target_fobj, callback=callback)
            bytes_buffer = target_fobj.getvalue()
        finally:
            target_fobj.close()
    finally:
        source_fobj.close()
        return bytes_buffer


ftputil.FTPHost.download_in_memory = download_in_memory

It returns a bytes buffer or None if the download failed. What do you think of this approach ?

#117 fixed Let makedirs accept `exist_ok` as argument and fix default behavior schwa ftputiluser
Description

thank you for this library.

to fit the pyhton os module it would be nice if makedirs could accept additional args.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note: See TracQuery for help on using queries.