From: Hagai C. <ha...@gm...> - 2010-05-11 09:04:27
|
The problem seems to be related to me using PyDev plug in for eclipse (http://pydev.org/updates). When I tried it from the command line, it goes: E:\Dev\workspace\NLP>C:\Python26\python.exe src\Hello.py Jython: 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] Executable: C:\Python26\python.exe Exec dir: C:\Python26 -----Original Message----- From: ala...@gm... [mailto:ala...@gm...] On Behalf Of Alan Kennedy Sent: Tuesday, May 11, 2010 11:50 AM To: Hagai Cibulski Cc: jyt...@li... Subject: Re: [Jython-users] using NLTK in Jython [Hagai] > I'm trying to call functions from the NLTK library, using Jython. > import nltk [ .. snip ..] > File "C:\jython2.5.1\Lib\ntpath.py", line 121, in splitdrive > if p[1:2] == ':': > TypeError: 'NoneType' object is unsubscriptable Please can you run the following script with jython, and report back on the output? import os.path, sys print "Jython: %s" % sys.version print "Executable: %s" % sys.executable print "Exec dir: %s" % os.path.dirname(sys.executable) Here is the output on my system Jython: 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) [Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] Executable: C:\jython251\jython.bat Exec dir: C:\jython251 Thanks, Alan. |