It's all part of the process (or subprocess as the case may be)
On occasion I make the case for installing python in order to extend the usefulness of the environment in Vr, or at least getting hold of some of the most useful standard libraries. Well here is another good reason. This is just a snippet that I will use later but I figure this is as good a place as any to keep track of it.
Before too long I want to write a script that will depend on running an external process, then interacting with the results of the process (no spoilers yet). In order to do that I'm going to make something similar to the following call to process some files leaving the results in the working directory. The research I did here was to make sure I had a way to not proceed until the original process was complete. Later I'll need to make sure I can run a shell command and capture the resulting output but this will do for now.
import subprocessthe last line is just to beep so I knew when it was done.
process = subprocess.Popen('lasboundary -i *rgb1.las -otxt')
process.wait()
print process.returncode
print '\a'
No comments:
Post a Comment