Date: Wed, 9 Jan 2008 11:12:42 -0600
Reply-To: "Peck, Jon" <peck@spss.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Peck, Jon" <peck@spss.com>
Subject: Re: Python code error
In-Reply-To: A<!&!AAAAAAAAAAAYAAAAAAAAAHBTK78G6qFApq+L7QZv5b3CgAAAEAAAAFie42hMzxFCtjTqXyFbUVwBAAAAAA==@tiscali.it>
Content-Type: text/plain; charset="utf-8"
The viewer and tables modules are currently not available for SPSS 16 due to architectural changes in the product. New versions are under development that will take advantage of the SpssClient apis instead of using the COM interfaces. This will eliminate the need for the win32com com libraries required with previous versions. The new versions will be portable across Windows, Mac, and Linux.
HTH,
Jon Peck
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Luca Meyer
Sent: Tuesday, January 08, 2008 2:18 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: [SPSSX-L] Python code error
Hello,
I have just installed SPSS 16 and Python 2.5 with several modules and
plug-ins.
I have then tried this very interesting piece of code (slightly adapted from
Jon Peck's Programmability slides I have downloaded from HYPERLINK
"http://www.spss.com/devcentral/"www.spss.com/devcentral/):
GET FILE "C:\Programmi\SPSSInc\SPSS16\Samples\Employee data.sav".
BEGIN PROGRAM.
import spss, tables
cmd=r"""CTABLES /TABLE JOBCAT BY GENDER
/TITLES TITLE='JOB CATEGORY BY GENDER'
/COMPARETEST TYPE=PROP"""
tables.mergeLatest(cmd, autofit=False)
END PROGRAM.
Unfortunately I get the following error:
This module requires pythoncom and win32com.client modules, which can be
downloaded from http://sourceforge.net/projects/pywin32/ Be sure to get the
Python 2.4 version.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "C:\Python25\lib\site-packages\tables.py", line 130, in <module>
import spss, viewer, sys
File "C:\Python25\lib\site-packages\viewer.py", line 47, in <module>
import pythoncom, win32com.client
File "C:\Python25\Lib\site-packages\pythoncom.py", line 2, in <module>
import pywintypes
File "C:\Python25\lib\site-packages\pywintypes.py", line 102, in <module>
__import_pywin32_system_module__("pywintypes", globals())
File "C:\Python25\lib\site-packages\pywintypes.py", line 64, in
__import_pywin32_system_module__
import _win32sysloader
ImportError: No module named _win32sysloader
Please notice that I have uploaded the python client modules, and it looks
like the more module I add the more there are other modules needed...
Can anyone assist me on this one?
Thanks,
Luca
Mr. Luca MEYER
Market research, data analysis & more
HYPERLINK "http://www.lucameyer.com/"www.lucameyer.com - Tel:
+39.339.495.00.21
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.13/1213 - Release Date: 07/01/2008
9.14
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
LISTSERV@LISTSERV.UGA.EDU (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
|