Thanks Brad!
Time to suck it up and try to rewrite in Python I guess. :)
-T
Bradley Gabe wrote:
AFAIK, Windows shell will always return only 0 or 1. I read that
somewhere, thus it must be true ;-)
If you don't find a direct Windows answer, Python gives you a way out.
You can run a Python script that calls os.popen(), which runs a
command string and can redirect the output to a new variable:
import os
#Run command
cmd = '"rush -submit borg < C:\QueRushFile0.txt"
try:
pipe = os.popen(cmd, 'r').read()
except OSError, e:
print 'System command failed: '+cmd
#If command finishes, results should be contained in pipe
print pipe
On 10/15/07, takita <takita(at)earthlink.net
<mailto:takita(at)earthlink.net>> wrote:
> Hi list...
>
> Probably a stupid question but is there a way to return the stdout from
> a running the system command? In my case I'd like to get back the
jobid
> from running the rush submit command (basically return the stdout from
> running that line to XSI), e.g. typing
>
> "rush -submit borg < C:\QueRushFile0.txt"
>
> in a windows shell gives me
>
> "set RUSH_JOBID=borg.658"
>
> which I can then use to chain another dependent job on, etc etc... But
> running something like
>
> system("rush -submit borg < C:\\QueRushFile0.txt");
>
> from within XSI gives me back "1" or "0" (succceed or fail,
> presumably). Any ideas?
>
> -T
>
>
>
>
>
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM
<mailto:Majordomo(at)Softimage.COM> with the following text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi