在成员函数中访问脚本级函数

accessing script level functions inside member functions

我有一个 jython 脚本,其中 class 是用一些成员函数定义的。在脚本中还定义了其他函数:

    import xxxx
    class SomeClass  (Callable):
        def call(self):
            hello()

    def hello():
        print 'hello'        

    ldr_files = []
    ldr_files.append(SomeClass())
    thread_pool = Executors.newFixedThreadPool(8)
    results = thread_pool.invokeAll(ldr_files)

然而,这似乎与jython不一致,它没有调用'hello()'函数。

还有许多其他成员函数 - 在调用 hello() 之前调用的成员函数调用等,它们工作正常。只有当控件移动到那个调用时,它似乎并没有调用该函数(没有打印 hello)。

问题出在实际代码中传递的参数中。拼写错误 !对于一个不愿向我展示的编辑来说,就这么多了。

抱歉浪费了时间。