SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы
НазадМетки: python
To install Jython, go to http://jython.sourceforge.net.
Note
Select “test the beta”.
The download is a .class file, which will run an installer when you execute it using java -jar.
You also need the Java Development Kit (JDK), and to add jython-complete.jar to your Java CLASSPATH. As an example, here is the appropriate section in my .bashrc for *nix; for Windows you need to do the equivalent:
export set JYTHON_HOME="/Users/bruceeckel/jython2.5b0" export set CLASSPATH=.:..:$JYTHON_HOME/jython-complete.jar
When you run Jython, you might get the warning: can't create package cache dir, '/cachedir/packages'. Jython will still work, but startup will be slower because caching isn’t happening. Jython caching requires /cachedir/packages/ in the python.home directory. It is often the case on *nix that users lack sufficient priveleges to create or write to this directory. Because the problem is merely permissions, something like mkdir cachedir; chmod a+rw cachedirwithin the Jython directory should eliminate this warning message.