import portage
if (not sys.stdout.isatty()) or (portage.settings["NOCOLOR"] in ["yes","true"]):
nocolor()
if "psyco" in portage.features:
try:
import psyco
except ImportError:
print "!!! You need Pysco installed or set FEATURES=\"-psyco\" in make.conf"
sys.exit(1)
def normpath(mystr):
if mystr and (mystr[0]=='/'):
return os.path.normpath("///"+mystr)