How do I remove/unlink wildcarded files
Emil Oppeln-Bronikowski
emil at fuse.pl
Fri Jan 2 03:52:38 EST 2015
> This doesn't seem to work because it's a wildcard filename. What is the
> proper way to delete files using wildcards?
You could try glob[1] and then iterate over collected list (it also
gives you a chance to handle errors like unreadable/not owned by you files).
[1] https://docs.python.org/2/library/glob.html
--
Emil Oppeln-Bronikowski *|* http://fuse.pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150102/c289f560/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fusetiny.png
Type: image/png
Size: 2504 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20150102/c289f560/attachment.png>
More information about the Python-list
mailing list