= rpm-python の使用例 = [http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html RPM Guide (Fedora Draft Documentation)]の[http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-rpm-programming-python.html Chapter 16. Programming RPM with Python]にある例が、いくつかそのままでは動かなくなっているので修正例を提示します。 * [wiki:Packages/rpm/rpm-python/rpminfo パッケージの詳細情報を表示する] == Tips == === クラスがどのようなメンバーを持っているか調べる === {{{ $ python Python 2.6.6 (r266:84292, Apr 17 2011, 03:36:41) [GCC 4.4.5 20101001 (Vine Linux 4.4.5-3vl6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import rpm >>> print rpm.ds.__dict__ {'DNEVR': , '__getattribute__': , 'BT': , 'SetNoPromote': , 'EVR': , 'TagN' : , '__init__': , 'Sort': , '__setattr__': , '__new__': , 'next': , '__doc__': '', '__len__': , 'Count': , 'Search': , '__getitem__': , 'N': , 'Merge': , '__iter__': , 'Flags': , 'Ix': , 'Compare': , 'Rpmlib': , 'Color': , 'Refs': , '__delattr__': , 'Notify': , 'Find': } >>> }}}