Re: os.path.splitext() and case sensitivity

2005-12-21 Thread rbt
Juho Schultz wrote: > rbt wrote: >> Hi, >> >> Is there a way to make os.path.splitext() case agnostic? >> >> def remove_file_type(target_dir, file_type): >> for root, dirs, files in os.walk(target_dir): >> for f in files: >> if os.path.splitext(os.path.join(root, f))[1] in f

Re: os.path.splitext() and case sensitivity

2005-12-21 Thread rbt
Richie Hindle wrote: > [rbt] >> Is there a way to make os.path.splitext() case agnostic? >> >> def remove_file_type(target_dir, file_type): >> for root, dirs, files in os.walk(target_dir): >> for f in files: >> if os.path.splitext(os.path.join(root, f))[1] in file_type: >

Re: os.path.splitext() and case sensitivity

2005-12-21 Thread Richie Hindle
[rbt] > Is there a way to make os.path.splitext() case agnostic? > > def remove_file_type(target_dir, file_type): > for root, dirs, files in os.walk(target_dir): > for f in files: > if os.path.splitext(os.path.join(root, f))[1] in file_type: > pass > >

Re: os.path.splitext() and case sensitivity

2005-12-21 Thread Juho Schultz
rbt wrote: > Hi, > > Is there a way to make os.path.splitext() case agnostic? > > def remove_file_type(target_dir, file_type): > for root, dirs, files in os.walk(target_dir): > for f in files: > if os.path.splitext(os.path.join(root, f))[1] in file_type: >

os.path.splitext() and case sensitivity

2005-12-21 Thread rbt
Hi, Is there a way to make os.path.splitext() case agnostic? def remove_file_type(target_dir, file_type): for root, dirs, files in os.walk(target_dir): for f in files: if os.path.splitext(os.path.join(root, f))[1] in file_type: pass remove_file_type(sy