start mantra with pythons subprocess.Popen()

   3173   2   0
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
i want to write a little tool to render ifd sequences with mantra, controled by a python programm.

the code might look like this:

app = r“C:\…..\Houdini 9.1.165\bin\mantra.exe”
ifdpath = r“X:\…\ifd\render.1.ifd”
verbosity = “ -V 4”
mantra = subprocess.Popen(app + verbosity + “ < ” + ifdpath)


mantra starts but it does not read the file, it seems the the < does prevent a correct executing.

martin
User Avatar
Member
7725 posts
Joined: July 2005
Offline
File redirection is a shell feature but you're using Popen() without invoking mantra with a shell. So one way to do it is to form a command using some shell (eg. csh). However, that's needlessly inefficient in this case. Just use mantra's -f option. eg. app + verbosity + “ -f ” + ifdpath
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
thank You master edward
  • Quick Links