example: *python_extendedTransforms_levenshtein.sps. DATA LIST FREE /str1 (A8) str2 (A8). BEGIN DATA untied united END DATA. BEGIN PROGRAM. import trans, extendedTransforms tproc = trans.Tfunction() tproc.append(extendedTransforms.levenshteindistance, 'ldistance', 'f', ['str1','str2']) tproc.execute() END PROGRAM. error message: Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named trans thanks all!!! --
Sebastián
Daza Aranzaes |
Hi
You need to download the trans and extendedTransforms modules from http://www.spss.com/devcentral/ (Click on the Download link in the upper right end corner of the page to see the individual modules available. There are 8 screens of modules). You then have to save these modules in your C:\Python24\Lib\site-packages\ folder Regards, Raynald Levesque [hidden email] Website: www.spsstools.net _____ From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sebastián Daza Sent: March 10, 2007 2:01 PM To: [hidden email] Subject: python I installed python plug-in, I execute some examples and I have this error, does somebody know which the problem is? example: *python_extendedTransforms_levenshtein.sps. DATA LIST FREE /str1 (A8) str2 (A8). BEGIN DATA untied united END DATA. BEGIN PROGRAM. import trans, extendedTransforms tproc = trans.Tfunction() tproc.append(extendedTransforms.levenshteindistance, 'ldistance', 'f', ['str1','str2']) tproc.execute() END PROGRAM. error message: Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named trans thanks all!!! -- Sebastián Daza Aranzaes Instituto de Sociología UC 8-471 53 87 / 686 57 20 / Fax 5521834 [hidden email] |
In reply to this post by Sebastián Daza
You need to download more modules from SPSS Developer Central (www.spss.com/devcentral).
Get the trans.py module. You will also need spssaux.py, spssdata.py, and namedtuple.py You can put all these in \python24\lib\site-packages if you have installed Python in the standard location. trans and extendedTransforms require SPSS 15. It is best to use the 15.0.1 patch and the 15.0.1 version of the plug-in, although that is not related to the error message below. HTH, Jon Peck SPSS ________________________________ From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sebastián Daza Sent: Saturday, March 10, 2007 1:01 PM To: [hidden email] Subject: [SPSSX-L] python I installed python plug-in, I execute some examples and I have this error, does somebody know which the problem is? example: *python_extendedTransforms_levenshtein.sps. DATA LIST FREE /str1 (A8) str2 (A8). BEGIN DATA untied united END DATA. BEGIN PROGRAM. import trans, extendedTransforms tproc = trans.Tfunction() tproc.append(extendedTransforms.levenshteindistance, 'ldistance', 'f', ['str1','str2']) tproc.execute() END PROGRAM. error message: Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named trans thanks all!!! -- Sebastián Daza Aranzaes Instituto de Sociología UC 8-471 53 87 / 686 57 20 / Fax 5521834 [hidden email] |
Jon,
Funny, I was just trying to find the extendedTransforms module this afternoon. I found transform.py, spssaux.py, spssdata.py, namedtuple.py, and the specialtransforms.py modules, but no trans.py on the Python pages of the Download Library. Was I looking in the wrong place? Thanks Victor Kogler Peck, Jon wrote: > You need to download more modules from SPSS Developer Central (www.spss.com/devcentral). > > Get the trans.py module. You will also need spssaux.py, spssdata.py, and namedtuple.py > > > > You can put all these in \python24\lib\site-packages if you have installed Python in the standard location. > > > > trans and extendedTransforms require SPSS 15. It is best to use the 15.0.1 patch and the 15.0.1 version of the plug-in, although that is not related to the error message below. > > > > HTH, > > Jon Peck > > SPSS > > > > ________________________________ > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sebastián Daza > Sent: Saturday, March 10, 2007 1:01 PM > To: [hidden email] > Subject: [SPSSX-L] python > > > > I installed python plug-in, I execute some examples and I have this error, does somebody know which the problem is? > > example: > > *python_extendedTransforms_levenshtein.sps. > DATA LIST FREE /str1 (A8) str2 (A8). > BEGIN DATA > untied united > END DATA. > > BEGIN PROGRAM. > import trans, extendedTransforms > tproc = trans.Tfunction() > tproc.append(extendedTransforms.levenshteindistance, > 'ldistance', > 'f', > ['str1','str2']) > tproc.execute() > END PROGRAM. > > error message: > > Traceback (most recent call last): > File "<string>", line 1, in ? > ImportError: No module named trans > > thanks all!!! > > |
The trans module is on page 8 of the Downloads section.
extendedTransforms is on page 2. They are all alphabetical. Let me know if you still have trouble. ________________________________ From: Victor Kogler [mailto:[hidden email]] Sent: Saturday, March 10, 2007 10:48 PM To: Peck, Jon Cc: [hidden email] Subject: Re: python Jon, Funny, I was just trying to find the extendedTransforms module this afternoon. I found transform.py, spssaux.py, spssdata.py, namedtuple.py, and the specialtransforms.py modules, but no trans.py on the Python pages of the Download Library. Was I looking in the wrong place? Thanks Victor Kogler Peck, Jon wrote: You need to download more modules from SPSS Developer Central (www.spss.com/devcentral). Get the trans.py module. You will also need spssaux.py, spssdata.py, and namedtuple.py You can put all these in \python24\lib\site-packages if you have installed Python in the standard location. trans and extendedTransforms require SPSS 15. It is best to use the 15.0.1 patch and the 15.0.1 version of the plug-in, although that is not related to the error message below. HTH, Jon Peck SPSS ________________________________ From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Sebastián Daza Sent: Saturday, March 10, 2007 1:01 PM To: [hidden email] Subject: [SPSSX-L] python I installed python plug-in, I execute some examples and I have this error, does somebody know which the problem is? example: *python_extendedTransforms_levenshtein.sps. DATA LIST FREE /str1 (A8) str2 (A8). BEGIN DATA untied united END DATA. BEGIN PROGRAM. import trans, extendedTransforms tproc = trans.Tfunction() tproc.append(extendedTransforms.levenshteindistance, 'ldistance', 'f', ['str1','str2']) tproc.execute() END PROGRAM. error message: Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named trans thanks all!!! |
In reply to this post by Peck, Jon
Where do I find the documentation for the Graphics Production Language? I am
using SPSS 14.0 for Windows. Thanks Nick White |
Help/Topics.
Look at the Contents Tab. There is a GPL reference section with an introduction, detailed reference, and examples. -----Original Message----- From: Nick White [mailto:[hidden email]] Sent: Tuesday, March 20, 2007 11:24 PM To: Peck, Jon; [hidden email] Subject: GPL Where do I find the documentation for the Graphics Production Language? I am using SPSS 14.0 for Windows. Thanks Nick White |
In reply to this post by Nick White
GPL is documented within the Help system. All functions available and examples are included there. Search for GPL in the Index.
Note however, if you are serious about GPL, SPSS 15 is highly recommended since the most recent version of GPL was substantially enhanced between 14 and 15. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Nick White Sent: Tuesday, March 20, 2007 11:24 PM To: [hidden email] Subject: GPL Where do I find the documentation for the Graphics Production Language? I am using SPSS 14.0 for Windows. Thanks Nick White |
In reply to this post by Nick White
Nick,
Something you might find more useful than the help system is the actual GPL documentation. On my computer it is in the Manuals subdirectory of the main spss directory. A kind of related question. Does anyone know whether the syntax documentation exists as a separate pdf file. I know it is accessible from the help menu but there are some times when I like to look at the syntax manual without starting spss. I think I've looked carefully through the spss directories but I haven't found anything. Does anyone know? Thanks, Gene Maguin |
Gene,
It should be the file named "spssbase.pdf" in the installation directory. Cheers, Alex -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin Sent: Wednesday, March 21, 2007 8:34 AM To: [hidden email] Subject: [BULK] Re: GPL Importance: Low Nick, Something you might find more useful than the help system is the actual GPL documentation. On my computer it is in the Manuals subdirectory of the main spss directory. A kind of related question. Does anyone know whether the syntax documentation exists as a separate pdf file. I know it is accessible from the help menu but there are some times when I like to look at the syntax manual without starting spss. I think I've looked carefully through the spss directories but I haven't found anything. Does anyone know? Thanks, Gene Maguin |
In reply to this post by Nick White
The GPL Reference wasn't on my SPSS manuals disk for version 14.0. I eventually found the reference manual here: http://support.spss.com/tech/Products/SPSS/Documentation/SPSSforWindows/
I got there by trial and error... searches within the SPSS website were not helpful. You may need to log into the SPSS Support website to get access to this url. You can also find the Command Syntax Reference at this site (which manual was included on my SPSS manuals disk, btw.... that disk may have been customized for us based on our site license). Thanks! Nick -------------- Original message -------------- From: Gene Maguin <[hidden email]> > Nick, > > Something you might find more useful than the help system is the actual GPL > documentation. On my computer it is in the Manuals subdirectory of the main > spss directory. > > A kind of related question. Does anyone know whether the syntax > documentation exists as a separate pdf file. I know it is accessible from > the help menu but there are some times when I like to look at the syntax > manual without starting spss. I think I've looked carefully through the spss > directories but I haven't found anything. Does anyone know? > > Thanks, Gene Maguin |
In reply to this post by Nick White
By the way, you will need to log on to access the documentation website http://support.spss.com/tech/Products/SPSS/Documentation/SPSSforWindows/
If you don't have a username, you can use "guest" as both the username and the password. -------------- Original message -------------- From: Gene Maguin <[hidden email]> > Nick, > > Something you might find more useful than the help system is the actual GPL > documentation. On my computer it is in the Manuals subdirectory of the main > spss directory. > > A kind of related question. Does anyone know whether the syntax > documentation exists as a separate pdf file. I know it is accessible from > the help menu but there are some times when I like to look at the syntax > manual without starting spss. I think I've looked carefully through the spss > directories but I haven't found anything. Does anyone know? > > Thanks, Gene Maguin |
In reply to this post by Nick White
The GPL in PDF form had not been created at the time 14 shipped which is why you couldn't find it. And the GPL reference you eventually found at www.spss.com is for Version 15, not version 14. It has quite a few more functions in the version of GPL accompanying version 14.
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Nick White Sent: Wednesday, March 21, 2007 9:41 AM To: [hidden email] Subject: Re: GPL The GPL Reference wasn't on my SPSS manuals disk for version 14.0. I eventually found the reference manual here: http://support.spss.com/tech/Products/SPSS/Documentation/SPSSforWindows/ I got there by trial and error... searches within the SPSS website were not helpful. You may need to log into the SPSS Support website to get access to this url. You can also find the Command Syntax Reference at this site (which manual was included on my SPSS manuals disk, btw.... that disk may have been customized for us based on our site license). Thanks! Nick -------------- Original message -------------- From: Gene Maguin <[hidden email]> > Nick, > > Something you might find more useful than the help system is the actual GPL > documentation. On my computer it is in the Manuals subdirectory of the main > spss directory. > > A kind of related question. Does anyone know whether the syntax > documentation exists as a separate pdf file. I know it is accessible from > the help menu but there are some times when I like to look at the syntax > manual without starting spss. I think I've looked carefully through the spss > directories but I haven't found anything. Does anyone know? > > Thanks, Gene Maguin |
In reply to this post by Maguin, Eugene
As others have pointed out, the PDF version of the Command Syntax Reference accessed from the Help menu is a file called spssbase.pdf, contained in the SPSS installation directory. Starting with SPSS 15, the PDF version is also included on the Manuals CD.
Now a couple clarifications: 1. AFAIK, the installation process does not install the contents of the Manuals CD. If you have a "...Manuals subdirectory of the main SPSS directory" that's probably because someone manually created that directory and copied the contents of the Manuals CD there. 2. There is virtually no difference in the actual content of the GPL documentation between the PDF version on the Manuals CD and the material included in the help system. Both formats have their pros and cons, which is why we provide both formats. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin Sent: Wednesday, March 21, 2007 8:34 AM To: [hidden email] Subject: [BULK] Re: GPL Importance: Low Nick, Something you might find more useful than the help system is the actual GPL documentation. On my computer it is in the Manuals subdirectory of the main spss directory. A kind of related question. Does anyone know whether the syntax documentation exists as a separate pdf file. I know it is accessible from the help menu but there are some times when I like to look at the syntax manual without starting spss. I think I've looked carefully through the spss directories but I haven't found anything. Does anyone know? Thanks, Gene Maguin |
You might want to tell him how to launch help without running SPSS. I do it all the time by executing spsswin.chm. I refuse to reply to this guy.
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Oliver, Richard Sent: Wednesday, March 21, 2007 10:15 AM To: [hidden email] Subject: Re: [BULK] Re: GPL As others have pointed out, the PDF version of the Command Syntax Reference accessed from the Help menu is a file called spssbase.pdf, contained in the SPSS installation directory. Starting with SPSS 15, the PDF version is also included on the Manuals CD. Now a couple clarifications: 1. AFAIK, the installation process does not install the contents of the Manuals CD. If you have a "...Manuals subdirectory of the main SPSS directory" that's probably because someone manually created that directory and copied the contents of the Manuals CD there. 2. There is virtually no difference in the actual content of the GPL documentation between the PDF version on the Manuals CD and the material included in the help system. Both formats have their pros and cons, which is why we provide both formats. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin Sent: Wednesday, March 21, 2007 8:34 AM To: [hidden email] Subject: [BULK] Re: GPL Importance: Low Nick, Something you might find more useful than the help system is the actual GPL documentation. On my computer it is in the Manuals subdirectory of the main spss directory. A kind of related question. Does anyone know whether the syntax documentation exists as a separate pdf file. I know it is accessible from the help menu but there are some times when I like to look at the syntax manual without starting spss. I think I've looked carefully through the spss directories but I haven't found anything. Does anyone know? Thanks, Gene Maguin |
Free forum by Nabble | Edit this page |