I’m doing os.listdir() on a directory, and it returns a list like this:
[u'Somefile.gif', u'SomeDirectory', u'SomeJPEG.jpeg']
What are the u’s for? In my searches, I’ve heard that this:
- Is a fixed bug.
- Means the listed items are unicode.
I don’t believe either of these to be true.
In Python2, the
uinu'...'indicates the object is unicode.From the docs:
Perhaps you are calling
os.listdirwith a unicode argument. For example: