[issue19642] shutil to support equivalent of: rm -f /dir/*

2014-10-06 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19642] shutil to support equivalent of: rm -f /dir/*

2014-09-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > "rm -rf /dir" Isn't it shutil.rmtree()? Am I missing something? > "rm -f /dir/*" So it should skip dotted files, or remove them? -- ___ Python tracker

[issue19642] shutil to support equivalent of: rm -f /dir/*

2014-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Rather like this: for n in os.listdir(dirpath): p = os.path.join(dirpath, n) if os.path.isdir(p): shutil.rmtree(p) else: os.unlink(p) -- nosy: +serhiy.storchaka _

[issue19642] shutil to support equivalent of: rm -f /dir/*

2014-09-25 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue19642] shutil to support equivalent of: rm -f /dir/*

2013-11-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue19642] shutil to support equivalent of: rm -f /dir/*

2013-11-18 Thread R. David Murray
R. David Murray added the comment: See also issue 13229. You can replicate 'rm -f' like this: for p in glob.glob('/dir/*'): os.remove(p) That doesn't seem worth an extra function. The annoying one to emulate is 'rm -rf /dir/*', because with the current shutil tools you have to make

[issue19642] shutil to support equivalent of: rm -f /dir/*

2013-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +hynek, tarek versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue19642] shutil to support equivalent of: rm -f /dir/*

2013-11-18 Thread Ivan Radic
New submission from Ivan Radic: Shutil supports deleting of files and directories but it offers no way to delete directory content (without deleting directory itself). Shell programming includes a lot of "rm -rf /dir" and "rm -f /dir/*", and there is no direct equivalent of these commands in P