Message11363
I'm trying to use the carreralib
https://pypi.python.org/pypi/carreralib/0.2.0
When I execute the connection from python, it works:
[root@CLOUDCITY ~]# python
Python 2.7.10 (default, Jun 20 2016, 14:45:40)
[GCC 5.3.1 20160406 (Red Hat 5.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from carreralib import ControlUnit
>>> cu = ControlUnit('FF:B8:21:1D:DF:7F')
>>> cu.request()
Status(fuel=(0, 0, 0, 0, 0, 0, 0, 0), start=0, mode=2, pit=(False, False, False, False, False, False, False, False), display=8)
But when I try to do the same via Jython, I get the attached exception from the ControlUnit constructor.
My java code:
PythonInterpreter python = new PythonInterpreter();
// http://stackoverflow.com/questions/14754402/jython-importerror-no-module-named
python.exec("import sys");
python.exec("sys.path.append('/usr/lib/python2.7/')");
python.exec("sys.path.append('/usr/lib/python2.7/site-packages/')");
python.exec("from carreralib import ControlUnit");
python.exec("cu = ControlUnit('FF:B8:21:1D:DF:7F')");
My project is a spring-boot project, and I use the mvn package:
<dependency>
<groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId>
<version>2.7.1b2</version>
</dependency> |
|
Date |
User |
Action |
Args |
2017-05-08 11:17:24 | BjarkeBB | set | messageid: <1494242244.49.0.790552831567.issue2590@psf.upfronthosting.co.za> |
2017-05-08 11:17:24 | BjarkeBB | set | recipients:
+ BjarkeBB |
2017-05-08 11:17:24 | BjarkeBB | link | issue2590 messages |
2017-05-08 11:17:23 | BjarkeBB | create | |
|