Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/360.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 显示共享库的所有本机路径_Python_Xml_Python 2.7_Websphere_Jython - Fatal编程技术网

Python 显示共享库的所有本机路径

Python 显示共享库的所有本机路径,python,xml,python-2.7,websphere,jython,Python,Xml,Python 2.7,Websphere,Jython,我想使用jython脚本访问共享库本机路径 libraries = AdminConfig.list('Library').split('\n') 这将返回库的列表 在libraries.xml中 <libraries:Library xmi:id="Library_1443450998699" name="MY_TOOLKIT" description="AMY_TOOLKIT" isolatedClassLoader="false"> <classPath>

我想使用jython脚本访问共享库本机路径

libraries = AdminConfig.list('Library').split('\n')
这将返回库的列表

在libraries.xml中

<libraries:Library xmi:id="Library_1443450998699" name="MY_TOOLKIT" description="AMY_TOOLKIT" isolatedClassLoader="false">
    <classPath>MY_TOOLKIT</classPath>
    <nativePath>/mypath_TOOLKIT/lib/path.jar</nativePath>

我的书包
/mypath_TOOLKIT/lib/path.jar
我想访问每个库的本机路径


我怎样才能做到这一点。。。。任何帮助。。提前感谢

迭代从
列表返回的值
/
拆分
并使用
AdminConfig.showAttribute(lib,“nativePath”)
。有关其他AdminConfig操作,请参见知识中心中的主题。

查看XML数据刮取,这是一个非常简单的python内置过程。可能会有点帮助。您还可以使用regex,这将更加有用simple@RNar直接访问WebSphereApplicationServer的XML配置可能可行,但不建议这样做。