Print

Print


Hi Cristiano,

Regarding the recursive copy, from what I see it’s not exposed in the Python interface. This can be easily fixed, and next upcoming release will be 4.12.4 and a release for 5.x.x series is not scheduled yet.

Regarding our commitment to maintain and support the Python bindings the answer is yes, we are supporting and maintaining the component and there are no plans to drop it.

Cheers,
Michal

> On 19 Aug 2020, at 13:00, Urban, Cristiano <[log in to unmask]> wrote:
> 
> Hi,
> I'm trying to perform some tests with the xrootd python bindings. My first question is the following: is there a simple way to perform a recursive copy of a folder from one node to another?
> 
> Here below is shown a very bad piece of code that does the job. 
> 
> from XRootD import client
> from XRootD.client.flags import DirListFlags
> from XRootD.client.flags import StatInfoFlags
> from XRootD.client.flags import OpenFlags
> 
> 
> myclient = client.FileSystem('root://tape_frontend')
> myserver = client.FileSystem('root://transfer_node')
> 
> status, listing = myclient.dirlist('/home/tape_frontend/data/aaa/', DirListFlags.RECURSIVE, 0)
> 
> for entry in listing:
>     if entry.statinfo.flags == 16:
>         src = "root://tape_frontend//home/tape_frontend/data/aaa/" + entry.name <http://entry.name/>
>         dest = "root://transfer_node//home/transfer_node/data/aaa/" + entry.name <http://entry.name/>
>         process = client.CopyProcess()
>         process.add_job(source = src, target = dest, mkdir = True, force = True)
>         p = process.prepare()
>         r = process.run()
>         print(r, p)
>     else:
>         # it's a dir...
>         myserver.mkdir(entry.name <http://entry.name/>)
> 
> print("Transfer completed.")
> 
> I used three docker containers: one for launching the python script and the other two as source and destination for the copy process.
> 
> Please, could you give me some hints?
> 
> Another question: are these python bindings going to be maintained over time or not?
> 
> Thank you in advance for your time.
> 
> Best regards,
> Cristiano Urban.
> 
> -- 
> ______________________________________
> Cristiano Urban
> Email: [log in to unmask] <mailto:[log in to unmask]>
> Phone: +39 040 3199 288
> Skype: cristiano_271187
> Site/blog: https://crish4cks.net/ <https://crish4cks.net/>
> Use REPLY-ALL to reply to list
> 
> To unsubscribe from the XROOTD-L list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1 <https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1