is it possible to execute what is written in the notes attribute?

32 views
Skip to first unread message

Rudi Hammad

unread,
Jan 9, 2016, 5:05:39 PM1/9/16
to Python Programming for Autodesk Maya
hello,
the title of the post says it all. Here is my example

http://pastebin.com/NWpmZVP2

I am not sure why it is note working if the note says cmds.joint(), my def should be executing that.

cheers

Marcus Ottosson

unread,
Jan 9, 2016, 6:28:49 PM1/9/16
to python_in...@googlegroups.com

exec to the rescue.

def foo():
  exec(notesAttrValue)

--
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/03b7542c-3712-40fa-8e4d-0b41fafa778f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Rudi Hammad

unread,
Jan 10, 2016, 6:42:30 AM1/10/16
to Python Programming for Autodesk Maya
that was easy! thanks


El domingo, 10 de enero de 2016, 0:28:49 (UTC+1), Marcus Ottosson escribió:

exec to the rescue.

def foo():
  exec(notesAttrValue)
On 9 January 2016 at 22:05, Rudi Hammad <rudih...@gmail.com> wrote:
hello,
the title of the post says it all. Here is my example

http://pastebin.com/NWpmZVP2

I am not sure why it is note working if the note says cmds.joint(), my def should be executing that.

cheers

--
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_maya+unsub...@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

Reply all
Reply to author
Forward
0 new messages