A question about makedirs method

13 views
Skip to first unread message

Iacopo

unread,
Jan 4, 2009, 10:10:21 AM1/4/09
to Mailing list for the ftpsync2d project
Hi and happy new year,
I'm trying to use your code to sync my python scripts (more than 700
files, and about 40 first-level directory) between my computers. I
tried to understand it to adapt it to my needs, but I can't understand
the whole code yet. For exemple, in line 336: self.makedirs
(os.path.dirname(fullname), rm_local_listing=True, verbose=verbose)
Why there isn't a condition? In fact, during the running, I see that
the function is called every time a file is uploaded and I think that
slow very much the process (too much in my case), because I placed
some "print" and it seems (it's possible?) that makedirs is called
many times with same parameter (the first argument), and this is that
I don't understand.
Could you explain me this behavior?
Thank you and sorry for my english.

Pearu Peterson

unread,
Jan 4, 2009, 2:40:45 PM1/4/09
to ftps...@googlegroups.com
Hi,
I have implemented caching for makedirs method so that
directories should be created only once in one python session.
I have applied the patch to svn trunk.
HTH,
Pearu

Iacopo

unread,
Jan 5, 2009, 4:52:42 AM1/5/09
to Mailing list for the ftpsync2d project
Thank you! I'm going to try it.


On 4 Gen, 20:40, "Pearu Peterson" <pearu.peter...@gmail.com> wrote:
> Hi,
> I have implemented caching for makedirs method so that
> directories should be created only once in one python session.
> I have applied the patch to svn trunk.
> HTH,
> Pearu
>
Reply all
Reply to author
Forward
0 new messages