Yes, when you import my_script, it is effectively “run”. So what you can do
is launch 1 instance of mayapy, and pass it a single script that imports
the others.

$ mayapy my_script.py

*my_script.py*

import other_script1import other_script2

guess what im asking is if there you can specify the process id for example
to the Popen method and have it use the process if it already exists or
create one if it doesnt

This probably isn’t what you’re looking for. Yes, you can get the process
ID from a Popen instance, but unless you devise an interprocess
communication server/client between your processes, you haven’t got that
many options left for telling the mayapy you find to run another script.

-- 
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_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCFwBwRq-rzjgu9hbg8G7BDWkXLNR5VGTAN55SzMjbX3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to