Jon Peck
SPSS, an IBM Company
peck@us.ibm.com
312-651-3435



From: Ruben van den Berg <ruben_van_den_berg@hotmail.com>
To: SPSSX-L@LISTSERV.UGA.EDU
Date: 08/19/2010 12:01 AM
Subject: [SPSSX-L] Can Python render a list of all open datasets?
Sent by: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>





Dear all,

I know there's
spssaux.GetActiveDatasetName() but can Python also render a list of ALL open datasets?

begin program.
import SpssClient
SpssClient.StartClient()
ddlist = SpssClient.GetDataDocuments()
for i in range(ddlist.Size()):
  dd = ddlist.GetItemAt(i)
  ddname = dd.GetDatasetName()
  ddpath = dd.GetDocumentPath()
  print ddname, ddpath
SpssClient.StopClient()
end program.

TIA!

Ruben van den Berg

Consultant Models & Methods

TNS NIPO

Email: ruben.van.den.berg@tns-nipo.com

Mobiel: +31 6 24641435

Telefoon: +31 20 522 5738

Internet:
www.tns-nipo.com