I am a python newbie; it is highly likely someone has asked a similar question, though I can't find one. When I query for objects from a model created in another program I get a list like this:
lineObj = [obj for obj in model.objects if obj.type == OF.otLine]
print lineObj
[<Line: 'Upper1'>, <Line: 'Upper2'>, <Line: 'MooringLine'>, <Line: 'BuoyLine'>, <Line: 'RiserLine1'>, <Line: 'RiserLine2'>, <Line: 'AnchorLine1'>, <Line: 'AnchorLine2'>, <Line: 'AnchorLine3'>]
print lineObj[0]
<Line: 'Upper1'>
I would like to be able to pull only the text Upper1, Upper2, etc., but I am not sure how. It may be better to use a dictionary or something else. Thanks in advance for any feedback.