LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 8 Jan 2008 22:18:01 +0100
Reply-To:     Luca Meyer <lucameyer@tiscali.it>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Luca Meyer <lucameyer@tiscali.it>
Subject:      Python code error
Content-Type: text/plain; charset="windows-1250"

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


Back to: Top of message | Previous page | Main SPSSX-L page