newbie - modules for jython (under grinder 3) ?

B

bugbear

I'm just trying to use Grinder 3 to beat
up my http-app.

Grinder 3 comes with its own jython.jar.

Some of the sample scripts:
http://grinder.sourceforge.net/g3/script-gallery.html
use import statements that don't work for me.

Reading around, these are reference to modules.

Do I need a "proper" jython instead of the one
that grinder ships with?

Or...

Do I need to get and install some modules?

If the latter, where from and how?
I note that not all Python modules
can be used as Jython modules.

My most urgent need is for the threading module, although
I've faked my way round that by using Doug Lea's
concurrent library in java, which I can call
from Jython.
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html

But I'd like to know how to do it "right"

BugBear
 
D

Diez B. Roggisch

bugbear said:
I'm just trying to use Grinder 3 to beat
up my http-app.

Grinder 3 comes with its own jython.jar.

Some of the sample scripts:
http://grinder.sourceforge.net/g3/script-gallery.html
use import statements that don't work for me.

Reading around, these are reference to modules.

Do I need a "proper" jython instead of the one
that grinder ships with?

I guess so - at least there are jython-modules written as *py-files in
my jython installation, including the threading.py module. Now - I don't
exactly remember how to specify where to find those, but AFAIK there is
a system property that you have to set to that path.

So - go, fetch jython from jython.org, install it and try to proceed.

Diez
 
B

bugbear

Diez said:
I guess so - at least there are jython-modules written as *py-files in
my jython installation, including the threading.py module. Now - I don't
exactly remember how to specify where to find those, but AFAIK there is
a system property that you have to set to that path.

So - go, fetch jython from jython.org, install it and try to proceed.

OK - of course this means I'll have to tell Grinder to
use "my" Jython, not "its" Jython.

Hopefully that's well documented :)

BugBear
 
D

Diez B. Roggisch

OK - of course this means I'll have to tell Grinder to
use "my" Jython, not "its" Jython.

Hopefully that's well documented :)

If they use 2.1 - which you should hope :) - teaching it shouldn't be
much more as issuing

-Dpython.home=<your install path>

as argument to the VM.

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top