From: alex1ta <re...@bu...> - 2015-01-23 12:59:24
|
New submission from alex1ta: 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. ---------- components: Core, Installer, Library files: pylint.pth messages: 9445 nosy: alex1ta severity: normal status: open title: Pylint running on Jython 2.7b3 standalone raises false "import-error" messages (F0401). versions: Jython 2.7 Added file: http://bugs.jython.org/file1486/pylint.pth _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue2262> _______________________________________ |