Antoine Pitrou added the comment: I don't really understand, since this is an easy one-liner:
[n for n in os.listdir(...) if not n.startswith(".")] Also, as mentioned, what you want to hide is not necessarily well-defined. For example, under Unix you might want to hide "*~" files. So I don't think os.listdir() should grow such an option, it's up to user code to decide what should be displayed / reported to the user. (or in other words: while Python provides filesystem-access functions, Python is not a shell) ---------- nosy: +pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18087> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com