On Sat, Mar 2, 2019, 2:21 PM likage <dissidia....@gmail.com> wrote:

> Hi everyone, I am trying to launch a terminal command (I am using Linux)
> in Maya.
>
> In the terminal, if I typed in `meld`, it launches an editor.
> If I try to incorporate the following in Maya context, by using the
> following:
>
> subprocess.call(['meld'], shell=True)
>
> or `shell=False`, or remove the `shell` argument.. No editor is showing up.
>
> Any ideas?
>

You shouldn't need shell=True for this call since it doesn't make use of
any shell functionality.
subprocess.call() returns an exit code telling you if the program ran
successfully (code 0) but you aren't checking the call. You could first
ensure the process is succeeding and/or switch to check_call() to see if an
exception is raised. It is also possible that meld is installed in a
location that is in your terminal PATH but not in Maya's PATH. Try running
"which meld" from your terminal, and then using the absolute path in your
subprocess command.

Justin

-- 
> 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/292d677e-a469-4f04-81cf-3ddbde468235%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/292d677e-a469-4f04-81cf-3ddbde468235%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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1VYYBgAoJi1c_jA23Q32dds6i9w3yYG%2B%3DyE7sy-e4aUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to