You have a typo between the two ways you format the string :
tmpname = "%smaster_crtl" % sel.namespace()
tmp = "%smaster_ctrl" % selects[0].namespace()
crtl vs ctrl
--
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/53b82fa7-91de-4eee-b8f1-03d5c6c668e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/8f3151a3-7a9b-4fdc-8721-f8cb60d35c10%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAAssL7bjy%2BHYmO0o4byZMrWSZ%2BmThofJkZkUD8O_HgwoBDhZ0g%40mail.gmail.com.
You should just test both approaches and find out if the performance difference is acceptable. In a recent thread on this group, there was an example of creating many pynodes vs using cmds. At lower numbers you may not perceive a difference. At higher numbers it could be seconds vs subseconds
--
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/1e01a0a8-fdb0-4af8-92c9-c8580c9ff862%40googlegroups.com.
I tend to prototype in PyMel, just since doing stuff is easy, less typing. But like Justin said, can be slow depending on what you're doing. If I found it this is a performance critical application I move it into cmds, and if not suitable, the API. Over time you sort of learn at which point you should start.
--
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/2e10cd67-5507-4bf7-8197-d45dbd78294a%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7d8ad41f-3f98-43ca-946a-1d5f14ab4b50%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
On Fri, 13 Mar 2015 5:55 PM Panupat Chongstitwattana <panu...@gmail.com> wrote:
Is there a list of available except type? For example if I'm doing
try:
os.makedir(dir)
except .....:
passWhere can I find out what error to catch apart from trying it out?
docs are your friend:
https://docs.python.org/2/library/os.html
"Note All functions in this module raise OSError in the case of invalid or inaccessible file names and paths, or other arguments that have the correct type, but are not accepted by the operating system."
Usually either the module or specific function docstring should explain the exceptions that can be raised
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/8f3151a3-7a9b-4fdc-8721-f8cb60d35c10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/7d8ad41f-3f98-43ca-946a-1d5f14ab4b50%40googlegroups.com.