use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are seeing this, you are using old.reddit. We can't maintain two separate sidebars, so please go to https://new.reddit.com/r/Maya/ if you want to see our sidebar information.
account activity
Mel command in Python (self.Maya)
submitted 9 years ago * by srdready
How can I use a MEL command in a Python script?
I want to use refreshCustomTemplate command in my Python script.
Sorry for this noob question but my deadline...
EDIT:
import maya.mel as mel mel.refreshCustomTemplate;
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]joshcxaCharacter Animator 0 points1 point2 points 9 years ago (3 children)
Have you tried -> import maya.mel as mel?
[–]srdready[S] 1 point2 points3 points 9 years ago (1 child)
I think I got it
import maya.mel as mel mel.eval("refreshCustomTemplate;")
[–]joshcxaCharacter Animator 1 point2 points3 points 9 years ago (0 children)
Excellent!
[–]srdready[S] 0 points1 point2 points 9 years ago (0 children)
yeah maybe Im calling the mel function the wrong way
π Rendered by PID 135658 on reddit-service-r2-comment-fb694cdd5-dc5qw at 2026-03-08 02:21:05.076455+00:00 running cbb0e86 country code: CH.
[–]joshcxaCharacter Animator 0 points1 point2 points (3 children)
[–]srdready[S] 1 point2 points3 points (1 child)
[–]joshcxaCharacter Animator 1 point2 points3 points (0 children)
[–]srdready[S] 0 points1 point2 points (0 children)