Re: Ideas for creating processes

2010-03-13 Thread Piet van Oostrum
> J (J) wrote: >J> And now I'm looking at subprocess and I can set shell=True and it will >J> intrepret special characters like & >J> So could I do something like this: >J> for item in pathlist: >J> subprocess.Popen('rsync command &', shell=True) >J> and simply wait unti they are all d

Re: Ideas for creating processes

2010-03-11 Thread bobicanprogram
On Mar 10, 4:52 pm, J wrote: > I'm working on a project and thought I'd ask for a suggestion on how > to proceed (I've got my own ideas, but I wanted to see if I was on the > right track) > > For now, I've got this: > > def main(): > ## get our list of directories to refresh > releases=sys.arg

Re: Ideas for creating processes

2010-03-10 Thread J
On Wed, Mar 10, 2010 at 18:03, MRAB wrote: > Are you sure that you would gain from doing more than one at a time? > > The bottleneck will probably be the speed of your network connection, > and if that's working at its maximum speed with one sync then doing > several concurrently won't save any ti

Re: Ideas for creating processes

2010-03-10 Thread MRAB
J wrote: I'm working on a project and thought I'd ask for a suggestion on how to proceed (I've got my own ideas, but I wanted to see if I was on the right track) For now, I've got this: def main(): ## get our list of directories to refresh releases=sys.argv[1:] if len(releases) < 1:

Re: Ideas for creating processes

2010-03-10 Thread Martin P. Hellwig
On 03/10/10 21:52, J wrote: I'm working on a project and thought I'd ask for a suggestion on how to proceed (I've got my own ideas, but I wanted to see if I was on the right track) Well I can't speak with authority but I would go into similar lines, especially since you want to call an externa

Re: Ideas for creating processes

2010-03-10 Thread J
On Wed, Mar 10, 2010 at 16:52, J wrote: > the quick and dirty would be (as I'm imagining it at the moment): > for path in pathlist: >    chdir into path >    execute rsync or zsync > > but that gets me moving into one dir, updating, then moving into another. > > What I was wondering about though,

Ideas for creating processes

2010-03-10 Thread J
I'm working on a project and thought I'd ask for a suggestion on how to proceed (I've got my own ideas, but I wanted to see if I was on the right track) For now, I've got this: def main(): ## get our list of directories to refresh releases=sys.argv[1:] if len(releases) < 1: print