15 Mar 09:09
Re: calling embedded jython from other java class
Pekka Klärck <peke <at> iki.fi>
2010-03-15 08:09:58 GMT
2010-03-15 08:09:58 GMT
[Resending because I first used wrong sending address and the email was blocked.] 2010/3/7 Kai Hackemesser <kai.hackemesser <at> gmail.com>: > I debugged a bit in the meantime on this issue. > > For reference see the source code at > http://code.google.com/p/robotframework/source/browse/#svn/trunk/src/robot > > that 'robot' module has a module 'common' which has the file model.py: > > http://code.google.com/p/robotframework/source/browse/trunk/src/robot/common/model.py > > this has an import statement at line 16: > > import random > > The classloader is then asked to to resolve > "robot/common/random/__init__$py.class", followed by > "robot/common/random/__init__.py", "robot/common/random$py.class" and > "robot/common/random.py" > > The URL class loader is not asked for "Lib/random.py" or it's $py.class > file. which would match with the one in the jython standalone file (I have > tested finding it with this string). Is this a bug in the Jython resolver or > should I tell the people from the robotframework to use a different way to > import it? (If the is one - my python knowledge is not much better than my > knowledge of the Human Genome Project - I know it exists and what they try > to do.) I don't think there's anything wrong with `import random`, it should simple import the standard random module. This seems to be either a problem in your setup or a Jython bug. Why are you trying to run Robot Framework directly from Java in your Maven plugin? Couldn't you simply run it through the system and then be able to use both Python and Jython interpreters? I think that was the idea in the prototype version that was created some time ago [1]. Anyway, this discussion is probably better continued on robotframework-users mailing list. [1] http://code.google.com/p/robotframework-javatools/source/browse/#svn/maven-plugin Cheers, .peke -- Agile Tester/Developer/Consultant :: http://eliga.fi Lead Developer of Robot Framework :: http://robotframework.org ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
RSS Feed