Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Accessing EASE module from Python module

Hi Vinod,

when we run a python script, EASE injects some methods into the global
namespace. I am not a python expert, but to my knowledge modules are
separated from each other. So I guess whatever we push to the main
module is not visible for other modules.

As you may also use import statements instead of loadModule():

	loadModule("/some/module")
	import eclipse.some.module as my_module

you may try to import the EASE module in main and pass it on to your
module as a parameter.

Just generally I am not sure if it is a good idea to build python
modules on top of EASE modules. Switching between python and Java
always comes with high performance costs. So you want to keep these
calls on a minimum level. Therefore I would not recommend to start
building frameworks on top of these modules.

best regards
Christian

>
> I'm trying to call loadModule(<EASE module>) from a python module
> (say test_module.py). test_module.py is loaded by Main.py.
> Main.py is executed by EASE py4j engine and I'm getting "NameError:
> name 'loadModule' is not defined". If I'm using loadModule(<EASE
> module>) from Main.py, it's working fine.
> I want to use test_module itself to call loadModule(<EASE module>),
> please guide me here.
>



Back to the top