WLST scripting and importing self-made module
I am trying to write a WLST script.
As I found that I always repeat doing similar setup, I tried to make some util functions to ease my script writing.
Later when I tried to pull those functions to an external .py as a module, I failed to do so:
assume I have a main script (domain_config.py), and the util function script (wlst_util.py) Here is what I put in domain_config.py:
import wlst_util import *
loadProperties('domain.properties')
....
create_jms_conn_factory(....);
First it complains for my delcaration in the wlst_util.py for the method:
create_jms_conn_factory(...., is_xa=False)
it complains "NameError: False".
ok, then I remove the default param, then it complains for those cd() function (provi开发者_StackOverflow社区ded by WLST).
Then I tried to do "from wl import *" in wlst_util.py, the script failed at loadProperties line (NullPointerException).
I tried to put the import after loadProperties, then the cmo variable in my main script become None...
What is the right way I should do just for pulling those util function to a separate file?..
Thanks
精彩评论