Unicode File Names

Mark Tolonen M8R-yfto6h at mailinator.com
Fri Oct 17 16:57:29 CEST 2008


"Jordan" <jordan.taylor2 at gmail.com> wrote in message 
news:311aa0af-6acd-45b6-b89b-c5aebe957afe at 75g2000hso.googlegroups.com...
>>>> l = os.listdir(unicode(os.getcwd()))

Other options to get the same result:

l = os.listdir(os.getcwdu())
l = os.listdir(u'.')

Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0.   Since 
the behavior is now identical it seems os.getcwdu() should be dropped.

-Mark




More information about the Python-list mailing list