X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc_config.py;h=9bf3f8b326ad24912df3d3795e9ce8e0a0672af5;hb=54d2835713e86791de8a0511ab3a3e8a72b2df2f;hp=d1ab2b43c6c52d995d2289b44e3e3d149a820ee4;hpb=93a436f3989574a61193dac251f8c5c7727ed702;p=myplc.git diff --git a/plc_config.py b/plc_config.py index d1ab2b4..9bf3f8b 100644 --- a/plc_config.py +++ b/plc_config.py @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: plc_config.py,v 1.2 2006/04/04 22:09:25 mlhuang Exp $ +# $Id: plc_config.py,v 1.5 2007/08/31 04:48:37 mef Exp $ # import xml.dom.minidom @@ -741,6 +741,19 @@ DO NOT EDIT. This file was automatically generated at return buf.getvalue() + def output_groups(self, encoding = "utf-8"): + """ + Return list of all package group names. + """ + + buf = codecs.lookup(encoding)[3](StringIO()) + + for (group, packages) in self._packages.values(): + buf.write(group['name'] + os.linesep) + + return buf.getvalue() + + def output_comps(self, encoding = "utf-8"): """ Return section of configuration. @@ -785,6 +798,6 @@ class TrimTextElement(xml.dom.minidom.Element): if __name__ == '__main__': import sys - if len(sys.argv) > 1 and sys.argv[1] in ['build', 'install']: + if len(sys.argv) > 1 and sys.argv[1] in ['build', 'install', 'uninstall']: from distutils.core import setup setup(py_modules=["plc_config"])