Re: Create multiple directories

2008-02-24 Thread Paul Lemelle
7stud & Jeff, Thanks for yoru input - there's still a few things for me to learn. :) Paul On Sun, 24 Feb 2008 18:07:15 -0800 (PST), 7stud <[EMAIL PROTECTED]> wrote: >On Feb 24, 6:27 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Paul Lemelle wrote: >> > I am somewhat new to Python and I am tryi

Re: Create multiple directories

2008-02-24 Thread Paul Rubin
Paul Rubin writes: > fmt = "new_dir%0%d" % len(str(num)) Typo, that was supposed to say "new_dir%%0%d" ... -- http://mail.python.org/mailman/listinfo/python-list

Re: Create multiple directories

2008-02-24 Thread Paul Rubin
7stud <[EMAIL PROTECTED]> writes: > for i in range(num): > dir_name = "new_dir%s" % i #same result as "new_dir" + str(i) > os.mkdir(dir_name) #creates dirs in current directory I find it's useful to keep all the filenames the same length and put leading zeros in the directory numbers, so

Re: Create multiple directories

2008-02-24 Thread 7stud
On Feb 24, 6:27 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Paul Lemelle wrote: > > I am somewhat new to Python and I am trying to create a program that > > automatically creates directories from a range of numbers. I > > researched the os.mkdir & os.makedirs methods, but they do not seem to > > (

Re: Create multiple directories

2008-02-24 Thread Jeff Schwab
Paul Lemelle wrote: > I am somewhat new to Python and I am trying to create a program that > automatically creates directories from a range of numbers. I > researched the os.mkdir & os.makedirs methods, but they do not seem to > (I don't know) how to include an argumnet to step through my list. >

Create multiple directories

2008-02-24 Thread Paul Lemelle
I am somewhat new to Python and I am trying to create a program that automatically creates directories from a range of numbers. I researched the os.mkdir & os.makedirs methods, but they do not seem to (I don't know) how to include an argumnet to step through my list. I woudl like to do the follwo