Re: [Tutor] Finding bottom level directories, and command-line arguments

2006-02-09 Thread Alan Gauld
I've been away so missed this thead earlier but one wee thing I just noticed: >> --- >> def isBottomDir(path): >> for item in os.listdir(path): >> if os.path.isdir(os.path.join(path,item)): >> return False >> return True >> --- >> for root, dirs, files in os.wa

Re: [Tutor] Finding bottom level directories, and command-line arguments

2006-02-08 Thread Simon Gerber
Hi Danny, > That web site (http://thedailywtf.com) is amusing in its way, but my > problem with it is that so many of the people there enjoy mocking others > in a mean-spirited and immature way. Programming well is a hard thing. > The adolescent posturing I see there isn't admirable to me. It's a

Re: [Tutor] Finding bottom level directories, and command-line arguments

2006-02-08 Thread Danny Yoo
> I've got this: > > --- > def isBottomDir(path): > for item in os.listdir(path): > if os.path.isdir(os.path.join(path,item)): > return False > return True > --- > > Is that an acceptable way of doing this? Hi Simon, Your code looks good to me! > I've been

Re: [Tutor] Finding bottom level directories, and command-line arguments

2006-02-08 Thread Kent Johnson
Simon Gerber wrote: > I've got this: > > --- > def isBottomDir(path): > for item in os.listdir(path): > if os.path.isdir(os.path.join(path,item)): > return False > return True > --- > > Is that an acceptable way of doing this? I've been reading > http://thedail

Re: [Tutor] Finding bottom level directories, and command-line arguments

2006-02-07 Thread Simon Gerber
Hi Danny, Thanks for the advice. > It might be interesting to write a function that takes an arbitrary > directory, and returns 'True' if that directory is a bottom-level > directory. Can you write this function? I've got this: --- def isBottomDir(path): for item in os.listdir(path):

Re: [Tutor] Finding bottom level directories, and command-line arguments

2006-02-07 Thread Danny Yoo
On Wed, 8 Feb 2006, Simon Gerber wrote: > I watch many different TV shows on my PC, as many of us do. But I am > sick and tired of forgetting which episode I was up to. So, in a > prodigious effort to avoid ever using, say, a pen, I am working on a > script to take over some of my brain's memory

[Tutor] Finding bottom level directories, and command-line arguments

2006-02-07 Thread Simon Gerber
G'day Tutors, I watch many different TV shows on my PC, as many of us do. But I am sick and tired of forgetting which episode I was up to. So, in a prodigious effort to avoid ever using, say, a pen, I am working on a script to take over some of my brain's memory handling. When complete, I will si