Hi, I have a problem when I want to use python with java class in tinyos.jar
the problem is like this:
1, I try to install the javaclass1.0 to make python could import java class
or package directly
2, javaclass1.0 is installed successfully, but I cannot make it work, when I
import java class, there is error come out
for example: when I run python test.py in javaclass1.0
Original exception was:
Traceback (most recent call last):
File "test.py", line 6, in <module>
import runclass
File "/home/yxg/Desktop/javaclass-0.1/runclass.py", line 6, in <module>
import java.lang
File "/usr/lib/python2.5/ihooks.py", line 404, in import_module
q, tail = self.find_head_package(parent, str(name))
File "/usr/lib/python2.5/ihooks.py", line 440, in find_head_package
q = self.import_it(head, qname, parent)
File "/usr/lib/python2.5/ihooks.py", line 491, in import_it
stuff = self.loader.find_module(partname, path)
File "/home/yxg/Desktop/javaclass-0.1/javaclass/classhook.py", line 127,
in find_module
stuff = self.find_module_in_dir(name, dir)
File "/home/yxg/Desktop/javaclass-0.1/javaclass/classhook.py", line 142,
in find_module_in_dir
result = ihooks.ModuleLoader.find_module_in_dir(self, name, dir,
allow_packages)
File "/usr/lib/python2.5/ihooks.py", line 244, in find_module_in_dir
stuff = self.find_module_in_dir("__init__", fullname, 0)
File "/home/yxg/Desktop/javaclass-0.1/javaclass/classhook.py", line 142,
in find_module_in_dir
result = ihooks.ModuleLoader.find_module_in_dir(self, name, dir,
allow_packages)
File "/usr/lib/python2.5/ihooks.py", line 253, in find_module_in_dir
fp = self.hooks.openfile(fullname, mode)
File "/usr/lib/python2.5/ihooks.py", line
197, in openfile
def openfile(self, *x): return open(*x)
ValueError: empty mode string
OR, who knows there is other tools to make python could work with java class
Thank you.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help