View Full Version : u'lambert1'?
ltethe 12-14-2011, 09:59 PM test = cmds.ls(mat=True)
for each in test:
print each
This gives predictable results:
lambert1
particleCloud1
test = cmds.ls(mat=True)
print test
This gives:
[u'lambert', u'particle']
What is the U?
|
|
WesHowe
12-15-2011, 07:51 AM
Unicode string.
<* Wes *>
cgrebeld
12-15-2011, 04:29 PM
In the first case you are printing the string value of unicode objects, the second case you are printing the string representation of a list of unicode objects.
It's the same as the difference between str(obj) and repr(obj).
ltethe
12-15-2011, 05:39 PM
Thanks to both of you! That was googlable and interesting.
CGTalk Moderation
12-15-2011, 05:39 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.