Message9445

Author alex1ta
Recipients alex1ta
Date 2015-01-23.12:59:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422017957.39.0.991063747881.issue2262@psf.upfronthosting.co.za>
In-reply-to
Content
Running Windows 7 SP1 and Java 1.8.0_25. Download Jython 2.7b3 Standalone: http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar

Choose a directory to keep the JAR, e.g. C:\Users\USER\projects and put the JAR inside.

In the same directory, create structure Lib\site-packages and inside site-packages, extract the contents of pylint, astroid, logilab\common and six.py from PyPI (as detailed on pylint.org). In site-packages, add pylint.pth as attached.

Using a sample project, e.g. https://github.com/andymccurdy/redis-py.git, run Pylint as follows:

`java -jar jython-standalone-2.7-b3.jar -m pylint redis-py/redis`

Results should show messages like:

F:  3, 0: Unable to import 'datetime' (import-error)
F:  5, 0: Unable to import 'warnings' (import-error)
F:  7, 0: Unable to import 'threading' (import-error)
F:  2, 0: Unable to import 'distutils.version' (import-error)
F:  4, 0: Unable to import 'select' (import-error)
F:  5, 0: Unable to import 'os' (import-error)
F:  6, 0: Unable to import 'socket' (import-error)
F:  8, 0: Unable to import 'threading' (import-error)
F:  9, 0: Unable to import 'warnings' (import-error)
F: 34, 4: Unable to import 'hiredis' (import-error)
F:  1, 0: Unable to import 'threading' (import-error)
F:  3, 0: Unable to import 'uuid' (import-error)
F:  1, 0: Unable to import 'os' (import-error)
F:  2, 0: Unable to import 'random' (import-error)
F:  3, 0: Unable to import 'weakref' (import-error)
F:  1, 0: Unable to import 'contextlib' (import-error)
F:  6, 4: Unable to import 'urlparse' (import-error)
F:  8, 4: Unable to import 'string' (import-error)
F:  9, 4: Unable to import 'Queue' (import-error)
F: 13, 8: Unable to import 'StringIO' (import-error)
F: 41, 4: Unable to import 'urllib.parse' (import-error)
F: 42, 4: Unable to import 'io' (import-error)
F: 43, 4: Unable to import 'string' (import-error)
F: 44, 4: Unable to import 'queue' (import-error)
F: 68, 4: Unable to import 'Queue' (import-error)
F: 72, 8: Unable to import 'Queue' (import-error)

Most of these should be able to be imported when running the Jython shell (like os, random, ...):

java -jar jython-standalone-2.7-b3.jar

This does not occur when Jython is natively installed on your machine, or if Pylint runs on a Python installation. Also, 2.7b3 is the only standalone Jython JAR that will run Pylint.
History
Date User Action Args
2015-01-23 12:59:17alex1tasetrecipients: + alex1ta
2015-01-23 12:59:17alex1tasetmessageid: <1422017957.39.0.991063747881.issue2262@psf.upfronthosting.co.za>
2015-01-23 12:59:17alex1talinkissue2262 messages
2015-01-23 12:59:16alex1tacreate