maya python call function from another py file
<p>I have a python script saved to file. </p>

<p>test1.py</p>

<pre><code>import maya.cmds as cmds
import sys

def process():
    print 'working'
</code></pre>

<p>I need to run the function from this script inside another python script, inside maya. I have:</p>

<pre><code>import sys
sys.path.append('J:\scripts\src\maya')

from test1 import process

test1.process()
</code></pre>

<p>but it gives me:</p>

<pre><code>from test1 import process
# Error: ImportError: file &lt;maya console&gt; line 4: cannot import name process # 
</code></pre>

<p>What am I doing wrong here?</p>

<p>('import test1' gives no error, so the path is correct).</p>