擅长:python、mysql、java
<p>您需要确保所有可导入的模块都在python路径上。在</p>
<p>如果您的文件在<code>E:/main_folder</code>中,则需要执行以下操作</p>
<pre><code>import sys
sys.path.append("E:/main_folder")
import bin.tools
import bin.mainScript
</code></pre>
<p>等等。设置它的方式(使用“bin/\uu init_uy.py”)告诉python该模块名为<code>bin</code>,它有名为“mainScript”和“tools”的子模块。长时间讨论<a href="http://tech-artists.org/forum/showthread.php?3987-Maya-GitHub-and-Script-Paths-for-Mel-and-Python-How-Would-*You*-Do-It&highlight=python+project" rel="nofollow">here</a></p>