[Python-ideas] os.listdir default to '.'
rob.cliffe at btinternet.com
Thu Jan 12 16:14:46 CET 2012
In Python 2.5 you can at least say os.listdir('') which had the same effect.
In Python 2.7 you can't.
Strictly speaking I think the default value should be os.path.curdir,
not specifically '.'
+1 from me
+1 on allowing the empty string argument again (may avoid breaking some
On 12/01/2012 15:02, Michael Foord wrote:
> Hello all,
> I frequently use Python from the interactive interpreter as a shell.
> It is a frequent, but mild, irritant that I have to type
> os.listdir('.') instead of just os.listdir().
> How about making '.' a default argument for os.listdir ?
> All the best,
> May you do good and not evil
> May you find forgiveness for yourself and forgive others
> May you share freely, never taking more than you give.
> -- the sqlite blessinghttp://www.sqlite.org/different.html
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas