Hi Gareth,

Did you get it working ? Would you mind posting an example?

thanks for the tip Raff!

Best,
Cris

On 6 December 2012 15:12, Gareth Bell <[email protected]>wrote:

> **
>
> Hi Raff,****
>
> ** **
>
> That's awesome.****
>
> ** **
>
> Forgive my ignorance but is it possible to run subprocess.Popen within
> logic? As it is currently written it works outside of logic but not within
> it.****
>
> ** **
>
> g****
>
> ** **
>
> ** **
>  ------------------------------
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Raffaele Fragapane
> *Sent:* 06 December 2012 03:27
> *To:* **[email protected]**
> *Subject:* Re: Python: subprocess caching****
>
> ** **
>
> The absolute dumbest way out of it is, in the same script, to copy the
> siShell bat file, add a line at the end with xsibatch's call and parameters
> the way you would manually call it in that shell, save it with a
> predetermined name and location, then call Popen on that bat instead of the
> base one. Delete the file once done.
>
> Hard to get any more straightforward than that if you have no particular
> needs other than launching a bat.****
>
> On Thu, Dec 6, 2012 at 3:54 AM, Cristobal Infante <[email protected]>
> wrote:****
>
> Hi guys,****
>
> ** **
>
> I would like to make python script that will: ****
>
> ** **
>
> - call the command prompt. ****
>
> - cache a given scene, without opening the softimage gui.****
>
> ** **
>
> I know I can run: xsi -script cache.py, so that takes care of the events
> inside soft.****
>
> ** **
>
> But how do I call the subprocess so it receives this commands? (xsi
> -script)****
>
> ** **
>
> import subprocess****
>
> proc = subprocess.Popen ("C:/Program Files/Autodesk/Softimage 2013
> SP1/Application/bin/SIShell.bat", shell=False )****
>
> ** **
>
> # this just opens the command prompt****
>
> ** **
>
> Any idea?****
>
> ** **
>
> Cheers,****
>
> Cris****
>
> ** **
>
> ** **
>
>
>
>
> --
> Our users will know fear and cower before our software! Ship it! Ship it
> and let them flee like the dogs they are!****
>

Reply via email to