--- Ow Mun Heng <[EMAIL PROTECTED]> wrote:
> answer the 2nd question I have regarding the "+" or
> "-" and whether the
> USE flag is in USE?
This should do the trick:
#!/usr/bin/python
import sys
if len(sys.argv)!=2:
print "usage: %s <tbz2 file>" % sys.argv[0]
sys.exit(1)
sys.path = ["/usr/lib/portage/pym"]+sys.path
import xpak
mytbz2=xpak.tbz2(sys.argv[1])
myuse=mytbz2.getelements("USE")
myiuse=mytbz2.getelements("IUSE")
for use in myiuse:
operator="-"
if use in myuse:
operator="+"
print operator + use + " "
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
--
[email protected] mailing list