You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
996 B
36 lines
996 B
#-*- codding: UTF-8 -*-
|
|
#!/usr/bin/env python
|
|
import os, sys
|
|
|
|
def get_global_USE():
|
|
ListUSE={}
|
|
path = '32wwwuse.desc'
|
|
with open(path) as f:
|
|
lines =f.read().split("\n")
|
|
for line in lines:
|
|
if line.startswith('#'):
|
|
pass
|
|
else:
|
|
try:
|
|
# result[cat].append(search(r))
|
|
ListUSE[line.split('-')[0]]= str(line.replace(line.split('-')[0], ""))
|
|
except Exception (e):
|
|
print(e)
|
|
return ListUSE
|
|
|
|
|
|
def get_local_USE():
|
|
ListUSE={}
|
|
path = '/usr/portage/profiles/use.local.desc'
|
|
with open(path) as f:
|
|
lines =f.read().split("\n")
|
|
for line in lines:
|
|
if line.startswith('#'):
|
|
pass
|
|
else:
|
|
try:
|
|
ListUSE[line.split('-')[0]] = str(line.replace(line.split('-')[0], ""))
|
|
except Exception (e):
|
|
print(e)
|
|
return ListUSE
|