[Maya-Python] Re: How to use subprocess.Popen() with maya ?
https://pymotw.com/2/subprocess/ is a really good rundown of working with the subprocess module. In fact the site is full of tutorials for the entire std library. On Friday, October 21, 2016 at 2:12:37 PM UTC-5, cyrill...@gmail.com wrote: > > Hello, > > Anyone know how to use subprocess inside Maya ? > When i'm trying this code inside maya: > > import subprocess > > dirName = '/u/Users/TEST/' > xdg = subprocess.Popen(['xdg-open', dirName], stdout=subprocess.PIPE, > stdin=subprocess.PIPE, stderr=subprocess.PIPE) > > It does nothing, but when I execute this code in a Linux script command it > works. > -- 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/d37ceba6-b760-4613-b9d0-bc6f3bd3405d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Maya-Python] Re: How to use subprocess.Popen() with maya ?
Le vendredi 21 octobre 2016 21:12:37 UTC+2, cyrill...@gmail.com a écrit : > Hello, > > Anyone know how to use subprocess inside Maya ? > When i'm trying this code inside maya: > > import subprocess > > dirName = '/u/Users/TEST/' > xdg = subprocess.Popen(['xdg-open', dirName], stdout=subprocess.PIPE, > stdin=subprocess.PIPE, stderr=subprocess.PIPE) > > It does nothing, but when I execute this code in a Linux script command it > works. Thanks all for your answers I got a result by doing this: subprocess.call('xdg-open {0}'.format(myFolder), shell=True) -- 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/8dd223f3-ebf9-45c4-8297-563508894908%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.