It depends on what you mean by "not needing to open SPSS". If you have SPSS installed, you can run a Python program in external mode and create a dataset that way. If you mean to do this without even having an SPSS installation, you would need to use the i/o dll, available from Developer Central, and wrap your code around it.
For the first case, the easiest path depends on your SPSS version. With 16 or later, you can use the Dataset class in the spss module to create the new dataset. Prior to that, you could either use the Spssdata class in the spssdata module, or you could generate DATA LIST syntax and submit it with the spss.Submit api. (Or you could use the Spssdata class with 16 and 17, too.)
HTH,
Jon Peck
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of Steve
Sent: Thursday, October 09, 2008 12:52 PM
To:
[hidden email]
Subject: [SPSSX-L] Creating a Data File from Scratch with Python
I am looking for a way to construct a data file from scratch without needing
to open SPSS. Can this be done with the Python extensions? I have been
browsing documentation, and I haven't seen any way to do it. Thus, I am
appeal to all you experts out there.
Thanks,
-- Steve
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD