I am encountering problems in the configuration of AdditionalServers
in Pyscan, eg
additionalServers = "test.wisc.edu;test2.wisc.edu"
iList = additionalServers.split(';')
appScanConfig = appScan.Scan.ScanData.Config
# the below fails
appScanConfig.set_AdditionalServers(iList)
Any thoughts? Thank you!
Python lists are not automatically converted to .Net Lists. However, Python
string is automatically converted to .Net string, so you can set the
additional-servers list one by one pretty quickly in the following way:
appScanConfig.AdditionalServers.Clear()
for additionalServer in iList:
appScanConfig.AdditionalServers.Add(additionalServer)
BTW[1] - you should use the SDK documentation to find the real method names,
instead of the methods that you see in Python (when using dir()), for
example, instead of using appScanConfig.set_AdditionalServers(iList), you
should use the method shown above -
appScanConfig.AdditionalServers.Add(additionalServer).
BTW[2] - in most cases, when you see a method that starts with set_ , you
can probably just set the value using =, for example:
Instead of calling set_X(value), you can just use X = value
Hope this clears things up,
-Ory
BTW[1] - you should use the SDK documentation to find the real method names,instead of the methods that you see in Python (when using dir()), forexample, instead of using appScanConfig.set_AdditionalServers(iList), youshould use the method shown above -appScanConfig.AdditionalServers.Add(additionalServer).
-Ory
From: axf-general...@googlegroups.com [mailto:axf-general...@googlegroups.com] On Behalf Of Jeffrey Savoy
Sent: Wednesday, May 23, 2007 11:20 PM
To: axf-general...@googlegroups.com
Subject: {axf-general} Re: Setting AdditionalServers in Pyscan