from cern import pymad as pm
pms=pm.init('jpymad', start='service')
pm.ls_models()
pm.cleanup()
Got the following:
$ python2 ls_test.py
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
Starting timed out ...
Model instances:
Traceback (most recent call last):
File "ls_test.py", line 3, in <module>
pm.ls_models()
File "/home/ylevinse/.local/lib/python2.7/site-packages/cern/pymad/tools/ls.py", line 58, in ls_models
print model
File "/home/ylevinse/.local/lib/python2.7/site-packages/cern/pymad/abc/model.py", line 52, in __str__
return self.name
File "/home/ylevinse/.local/lib/python2.7/site-packages/cern/jpymad/model.py", line 41, in name
return self.jmm.getName()
File "/usr/lib/python2.7/site-packages/py4j/java_gateway.py", line 432, in __call__
self.target_id, self.name)
File "/usr/lib/python2.7/site-packages/py4j/protocol.py", line 271, in get_return_value
raise Py4JError('An error occurred while calling %s%s%s. Trace:\n%s\n' % (target_id, '.', name, value))
py4j.protocol.Py4JError: An error occurred while calling o54.getName. Trace:
Tried a simple listing test:
Got the following: