It always goes after the string, no matter what. It is a method of a string
cmds.getAttr(curves['curve{}'.format('xyz')].spans*2+1
But you can avoid hard to read lines and break it apart
curve = curves['curve{}'.format('xyz')]
spans = cmds.getAttr('{}.spans'.format(curve))
spans = spans * 2 + 1
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9d99b0ee-88f3-4a44-9263-0bf8012c1a4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
thanks,
Sam
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9731b420-3b56-4d22-8201-db8e732c7068%40googlegroups.com.
Hey Sam,
attached is a cheat sheet I made for string formatting with .format() for my workshop. it might help you with your questions.
also
I do have a whole section on string formatting in my python workshop that I’m starting again at the end of June.
if you’re interested take a look:
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2DEmeSBidydEGoTTL7jGyS%2Bgge2U5Nxd0yutbn9DoZvQ%40mail.gmail.com.