Jump to content

Linux subprocess question


Recommended Posts

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.....



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...