Re: [Tutor] skip some directories

2005-05-31 Thread Danny Yoo
> At the end, i found the way of make it: > > dirBase = ['misc','TTF','Type1','CID','100dpi','75dpi','encodings', 'util'] > > for root, dirs, files in os.walk(dirName): > print dirs # for checking all directories that i have at beginning > for name in dirs: > if name in dirBase:

Re: [Tutor] skip some directories

2005-05-30 Thread Jonas Melian
Danny Yoo wrote: >>I'm trying to working with some directories only >> >>import os >>dirName = "/usr/share/fonts/" >>dirBase = ['misc','TTF','Type1','CID','100dpi','75dpi'] # directories to >>skip >> >>for root, dirs, files in os.walk(dirName): >>for end in dirBase: >>if root.endswith(e

Re: [Tutor] skip some directories

2005-05-30 Thread Danny Yoo
On Mon, 30 May 2005, Jonas Melian wrote: > I'm trying to working with some directories only > > import os > dirName = "/usr/share/fonts/" > dirBase = ['misc','TTF','Type1','CID','100dpi','75dpi'] # directories to > skip > > for root, dirs, files in os.walk(dirName): > for end in dirBase: >

[Tutor] skip some directories

2005-05-30 Thread Jonas Melian
Hi, I'm trying to working with some directories only import os dirName = "/usr/share/fonts/" dirBase = ['misc','TTF','Type1','CID','100dpi','75dpi'] # directories to skip for root, dirs, files in os.walk(dirName): for end in dirBase: if root.endswith(end): print 'skiped'