Best one to use for parsing xml that I found ( well, you have to work with it a bit ) is xml.etree.ElementTree and celementree.
http://stackoverflow.com/questions/7171140/using-python-iterparse-for-large-xml-files Also there is a method for removing unneeded references that will save a lot of memory bloat, until they fix the issues in the python code itself.... The nice part of writing your own is that you can adjust it to fit your needs, output to csv, or load a database like how we're doing it where I currently work....create graphs and the like.... After using cElementTree for awhile, you'll see how easy it is to parse through qstat ( and/or qhost ) output easily. I can provide code snippets to assist you if you need more guidance. Can't release the code though as this is part of an internal coding project. Hope this helps... Ed Lauzier -----Original Message----- From: Cameron Brunner [mailto:[email protected]] Sent: Tuesday, August 19, 2014 06:03 PM To: [email protected] Subject: Re: [gridengine users] Python modules for parsing grid command output Stu, I would like to let you know that while we don't have a python parsing module for Grid Engine Output we are in the process of creating a fully functional JSON formatted REST web service interface to Univa Grid Engine leveraging the high performance asynchronous Event Client interface. When complete we will create Python stubs for this interface to easily provide direct UGE access from native Python applications. I know this answer doesn't provide you with anything right now but I wanted to let you know about this future addition to the Grid Engine ecosystem. -Cameron On Tue, Aug 19, 2014 at 10:37 AM, <[email protected]> wrote: Message: 6 Date: Tue, 19 Aug 2014 11:17:22 -0400 (EDT) From: Stu Whitman <[email protected]> To: [email protected] Subject: [gridengine users] Python modules for parsing grid command output Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Hello, I need to discover the grid configuration from Python. I am considering calling qstat, qhost, qconf etc. from Python and parsing the output. I noticed some, but not all of the grid commands have an option to output in xml. Does anyone know of a Python module that might already take this approach? Thanks, Stu
_______________________________________________ users mailing list [email protected] https://gridengine.org/mailman/listinfo/users
