To display the list of servers in Websphere Application Server Jython is using AdminTask object.
The AdminTask,listServers will list down the servers. The server type is the parameter passed to list down different types of servers.
To list the Websphere Application Servers
AdminTask.listServers('[-serverType APPLICATION_SERVER]')
To list the Websphere Web Servers
AdminTask.listServers('[-serverType WEB_SERVER]')
AdminTask.listServers('[-serverType PROXY_SERVER]')
To list the Websphere Liberty Servers
AdminTask.listServers('[-serverType LIBERTY_SERVER]')
To list the Websphere on-demand routers
AdminTask.listServers('[-serverType ONDEMAND_ROUTER]')
To list the Websphere PHP servers
AdminTask.listServers('[-serverType PHP_SERVER]')