On Sun, Jun 29, 2008 at 11:13 AM, Saad Javed <[EMAIL PROTECTED]> wrote:
> import os
>
> list = ['*.ini', '*.db']
>
> for root, dirs, files in os.walk('/home/saad'):
> for list in files:
> os.remove(os.path.join('root', 'list'))
> print 'done'
>
> Unfortunately its a bit too efficient and nearly wiped my home dir before i
> manually killed it. Again...treat me like a super noob.
Hmmm...with the quotes on 'root' and 'list' it would only delete
/root/list. Please post the same code that you run!
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor