When you say it does not work, do you mean the second Maya window does not
visually close down, or that you still detect that the pid is alive?
Because you are using pipes for stdin/stdout/stderr, you need to make sure
you wait on the child:

a.kill()
a.wait()

After that, the child pid should disappear. Do you actually need the 3
pipes?


On Fri, Oct 17, 2014 at 2:06 PM, ynedelin <[email protected]> wrote:

> hey guys,
> here is the code
>
> a = subprocess.Popen("maya", stdout=subprocess.PIPE,
> stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
> a.kill()
>
> it does not work.
>
> I need to start second Maya instance and then shut it down from first Maya
> instance
>
> Second Maya starts fine but then Popen.kill() does not work. What am I
> missing?
>
> Thanks
> Yury
>
>  --
> 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/59b59367-5558-45e8-acc5-8979e76a304b%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/59b59367-5558-45e8-acc5-8979e76a304b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAPGFgA0doPH%3DSSKeVoKnHRQYuFwiaFije4Y4U8JSM%2Bta8fjDmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to