=========================================================================
Date: Mon, 17 Jul 2006 00:28:47 +0200
Reply-To: Alex Rasker <aprasker@hotmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Alex Rasker <aprasker@hotmail.com>
Subject: The asynchronous "problem" solved with Python...?
Content-Type: text/plain; format=flowed
Dear List, SPSS,
We are all very excited of course with the prospect of running scripts
synchronously with syntax (and vice versa). For small scripts one can
quickly convert them to python scripts and be done. For larger tasks one
might want to call the script from syntax using python to accmplish the
synchronous execution of the desired code. Does anyone know if the following
would then execute as one would hope?
*COMMAND submitted to SPSS.
!myscript.
*WHERE !myscript :=.
DEFINE !myscript ()
INCLUDE FILE='C:\MyFolder\Myscript.sps'.
!ENDDEFINE.
*WHERE "C:\MyFolder\Myscript.sps" :=.
****.
BEGIN PROGRAM.
import spss
spss.Submit(r"""
SCRIPT FILE='C:\MyFolder\Myscript.sbs'.
""")
END PROGRAM.
Thanks!
|