garf Posted May 22, 2019 Share Posted May 22, 2019 I want to check if an external movie file is being used by another process before continuing with a script. If I run this in the terminal it returns 1 (which I think is correct as it is being used by rv) lsof -t /mydirectory/mymovie.mov | wc -w if I run this in a python script in houdini it returns 0. subprocess.call(' lsof -t /mydirectory/mymovie.mov | wc -w', shell=True) Any idea as to why this is the case? Truth be told - I don't really know what I'm doing here..... Quote Link to comment Share on other sites More sharing options...
garf Posted May 22, 2019 Author Share Posted May 22, 2019 for future reference this does work: subprocess.check_output('/usr/sbin/lsof -t /mydirectory/mymovie.mov | wc -w', shell=True) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.