The path needs to be recognized by Maya, there's a few ways. The simplest
is to add the path to sys.path.
If you have your script at C:/some/path/yourscript.py you would do
import sys
sys.path.append('C:/some/path')
import yourscript
I highly recommend you check out the Python videos in Justin's channel.
https://www.youtube.com/user/justinisrael/videos
On Wednesday, June 27, 2018 at 12:18:42 PM UTC+7, AMAL ARJUN wrote:
>
> Suppose I'm having a Python script in a folder (/Desktop/test.py) and I
> want to load that through Python. How can I do that.?
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/a9afdc20-3746-46e3-a841-399d5ead5d67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.