中国开发网: 论坛: 程序员情感CBD: 贴子 532851
老玉米: 这是python的语法吗?
"""
This script starts an edit session, creates a WTC Server,
targets the WTC server to the server WLST is connected to and creates
a WTC service
"""

import sys
from java.lang import System


print "@@@ Starting the script ..."

url = sys.argv[1]
usr = sys.argv[2]
password = sys.argv[3]
wlsNWAddr = sys.argv[4]
tuxNWAddr = sys.argv[5]

connect(usr,password, url)
edit()
startEdit()

servermb=getMBean("Servers/examplesServer")
if servermb is None:
print '@@@ No server MBean found'

else:

....

try:
save()
activate(block="true")
print "@@@ WTC Server Resources created."
except:
print "@@@ Server Resources already exist or there was an error while trying to create new resources."
dumpStack()

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录