The following forum message was posted by fmalzer at 
http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4433544:

Hello,
I have the following jython module which runs fine with jython 2.2.1.
The modul controls the call of further jython modules.

from net.grinder.script import Test
from net.grinder.script.Grinder import grinder
from net.grinder.plugin.http import HTTPPluginControl, HTTPRequest
from HTTPClient import NVPair
from sit.grinder import XMLDataHandler
from at.spardat.gcms.grindertest import GcmsXMADataHandler

dataHandler = GcmsXMADataHandler.getHandler("all", grinder.statistics)
dataHandler.enableDebug()
scripts = dataHandler.getAllScripts()

# Ensure modules are initialised in the process thread.
for script in scripts: exec("import %s" % script)

def createTestRunner(script):
    exec("x = %s.TestRunner()" % script)
    return x

class TestRunner:
    def __init__(self):
        #tid = grinder.getThreadNumber()
        nextScript = dataHandler.getNextScript()
        self.testRunner = createTestRunner(nextScript)

    # This method is called for every run.
    def __call__(self):
        self.testRunner()


The Pydev editor states the following error:

undefined  variable x (line 17)

Do anybody have some suggestions what goes wrong?

:-Q ferry

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to