I am trying to execute this below code:
import sys
import java.lang.System as sys
servers=AdminControl.queryNames('WebSphere:type=Server,*').splitlines()
for server in servers:
name=AdminControl.getAttribute(Server,'name') pid=AdminControl.getAttribute(Server,'pid')
print "server=" + name + "pid=" + pid
when i execute this script i am getting error:
i am executing in WAS 6.0 in linux
[root@localhost bin]# ./wsadmin.sh -lang jython -f '/tmp/vimala/test4.py'
WASX7209I: Connected to process "dmgr" on node dmgrnode using SOAP connector; The type of process is: DeploymentManager
WASX7017E: Exception received while running file "/tmp/vimala/test4.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
(no code object) at line 0
File "", line 5
name=AdminControl.getAttribute(Server,'name')
^
SyntaxError: invalid syntax