Thanks very much to both of you for the detailed responses. I'm afraid this
is now beyond my expertise, I'm actually just setting up my home pipeline,
which is not meant to be nearly as robust as a full studio pipeline would
be. That being said, I do want to eventually put in something more robust
and learn more about the execution of making a more formal pipeline, so
this will be invaluable at that point. Much appreciated! For now I'll stick
to the absolute path as a quick fix.

Cheers,
Matt

On Wed, Nov 19, 2014 at 7:44 PM, Jesse Kretschmer <je...@krets.com> wrote:

> As Nathan pointed out, this is not a good solution. Why not use a FlipBook
> <http://docs.thefoundry.co.uk/nuke/63/pythondevguide/flipbook.html>?
>
> A flipbook can even be extended to support multiple platforms
> <https://gist.github.com/krets/f821fc47dcaf6c7820ee>.
>
> Anyhow, I will still answer your question as an academic exercise.
>
> subprocess.Popen will not instantiate bash. The docs
> <https://docs.python.org/2/library/subprocess.html#popen-constructor> say
> that it will use /bin/sh by default. There is an executable argument that
> will allow you to override the shell it will use. However, aliases *will
> not* work in a non-interactive shell and furthermore the .bash_profile
> (and other startup scripts) are *not* executed by bash for
> non-interactive shells.
>
> So to work around it, you may need to play game. In your .bash_profile add:
> shopt -s expand_aliases
>
> Then you need to change your Popen to work more like this:
>
> def rvFinalCheck(nodelist):
>     cmd = ['bash', '--login', '-c', 'rv']
>     for node in nodelist:
>         cmd.append(node['file'].value())
>     cmd.append('-over')
>     ocmd = ' '.join(cmd)
>     subprocess.Popen(ocmd, shell=True)
>
> Cheers,
> jesse
>
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to