Maya PYTHON _ if statement


Hi I want to make a window that when I click the button, only the curves are selected and their names are printed inside the textField. I only know how to select everything and print them all in the textField . Please help. thanks

window = cmds.window( widthHeight=(490, 485),title="braid")

def ygk_CurveSelect(*args):         
sels =
for sel in sels:
    if sel =='nurbsCurve', noIntermediate=True, objectsOnly=True, recursive=True):
        selString = " ".join(sel)
        add = cmds.textField('ygk_PathText', edit=True, text=selString)
        print 'fuck yeah!'
        print 'fuck no!'     
cmds.rowLayout( numberOfColumns=3, columnAttach=(1, 'right', 10), columnWidth=[(1,143),(2,245),(3,20)] )
ygk_textFld = cmds.textField('ygk_PathText', width=240)
cmds.button(label='Assign Curves', command=ygk_CurveSelect)



Actually I have the same question. please let me know if you find out.