eh... file out should be a exr file not jpg :) correction if someone is trying it out and I added "sh" if you haven't made the bash script and executable one
import subprocess script = "/home/stefan/makenice.sh" file_in = "/home/stefan/test.jpg" file_out = "/home/stefan/test.exr" subprocess.Popen( "sh %s %s %s" % (script, file_in, file_out), shell=True) On Sun, Feb 24, 2013 at 4:51 PM, Stefan Andersson <[email protected]>wrote: > Anyhow, solved it. Thanks Stephen for getting my brain on track. And > thanks everyone else for chipping in! > > bash script > > #!/bin/sh > export PATH=/usr/bin > export LD_LIBRARY_PATH=/usr/lib64 > maketx $1 --resize -o $2 > > Inside Softimage > > import subprocess > script = "/home/stefan/makenice.sh" > file_in = "/home/stefan/test.jpg" > file_out = "/home/stefan/test.jpg" > subprocess.Popen( "%s %s %s" % (script, file_in, file_out), shell=True) > > > best regards > stefan > > > > On Sun, Feb 24, 2013 at 4:35 PM, Luc-Eric Rousseau <[email protected]>wrote: > >> On Sun, Feb 24, 2013 at 10:18 AM, Stefan Andersson <[email protected]> >> wrote: >> > I rather not since that might break softimage. And I would have to do >> > that in each machine that has softimage. >> >> no, the point is that when you launch maketx from softimage, it >> inherits's softimage environment, so you should launch a shell script >> instead that will set the environment variable as appropriate and then >> launch maketx. That cannot break softimage, you're modifying the >> environment for a child process. processes are separate. >> > > > > -- > *Stefan Andersson | Digital Janitor* > blog <http://sanders3d.wordpress.com> | showreel<http://vimeo.com/sanders3d>| > twitter <http://twitter.com/sanders3d> | > LinkedIn<http://www.linkedin.com/in/sanders3d>| cell: > +46-73-6268850 | skype:sanders3d > > > -- *Stefan Andersson | Digital Janitor* blog <http://sanders3d.wordpress.com> | showreel<http://vimeo.com/sanders3d>| twitter <http://twitter.com/sanders3d> | LinkedIn<http://www.linkedin.com/in/sanders3d>| cell: +46-73-6268850 | skype:sanders3d

