[weblogic@zjtlcb bin]$ cat test_wlst.py
from java.util import *
from javax.management import *
import javax.management.Attribute
print 'starting the script .... '
connect('weblogic','weblogic1','t3://127.0.0.1:7001')
#ls()
aa= get('AppDeployments')
print type(aa)
for x in aa:
print x
[weblogic@zjtlcb bin]$ java weblogic.WLST test_wlst.py
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
starting the script ....
Connecting to t3://127.0.0.1:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
<type 'array'>
com.bea:Name=TLMap,Type=AppDeployment
com.bea:Name=SunDSPWP,Type=AppDeployment
com.bea:Name=CMS,Type=AppDeployment
com.bea:Name=SunCIS,Type=AppDeployment
com.bea:Name=DevOps,Type=AppDeployment
com.bea:Name=SunPLS,Type=AppDeployment