# Path: killMS/Other/ModColor.py
# HEADER = '\033[95m'
# OKBLUE = '\033[94m'
# OKGREEN = '\033[92m'
# WARNING = '\033[93m'
# FAIL = '\033[91m'
# ENDC = '\033[0m'
#     HEADER = ''
#     OKBLUE = ''
#     OKGREEN = ''
#     WARNING = ''
#     FAIL = ''
#     ENDC = ''
# def Str(strin0,col="red",Bold=True):
# def Sep(strin=None,D=1):
# def Title(strin,Big=False):
# def disable():


import os
from killMS.Other import ModColor
class ClassPrint():
    def __init__(self,HW=20,quote='"'):
        self.LeftW=HW
        self.WV0=50
        self.WV1=30
        self.WidthHelp=30
        self.quote=quote
        self.proto=" - %s %s %s : "
        self.Lproto=len(self.proto.replace("%s",""))


    def getWidth(self):
        rows, columns = os.popen('stty size', 'r').read().split()
        return int(columns)

    def Print(self,par,value,value2=None):
        parout=" - %s %s"%(par,"."*(self.LeftW-len(par)))
        if value2==None:
            valueOut=value
        else:
            valueOut="%s%s"%(value.ljust(self.WV0),(""" "%s" """%value2).rjust(self.WV1))
        print("%s = %s"%(parout,valueOut))
        
    def Print2(self,par,value,helpit,col="white"):
        WidthTerm=self.getWidth()
        Lpar=len(str(par))
        Lval=len(str(value))
        SFill="."*max(self.LeftW-self.Lproto-Lpar-Lval,2)
        WidthHelp=WidthTerm-(self.Lproto+Lpar+Lval+len(SFill))
        Spar="%s"%ModColor.Str(str(par),col=col,Bold=False)

# Path: killMS/Other/ModColor.py
# HEADER = '\033[95m'
# OKBLUE = '\033[94m'
# OKGREEN = '\033[92m'
# WARNING = '\033[93m'
# FAIL = '\033[91m'
# ENDC = '\033[0m'
#     HEADER = ''
#     OKBLUE = ''
#     OKGREEN = ''
#     WARNING = ''
#     FAIL = ''
#     ENDC = ''
# def Str(strin0,col="red",Bold=True):
# def Sep(strin=None,D=1):
# def Title(strin,Big=False):
# def disable():


# Path: killMS/Parset/ClassPrint.py
import os
from killMS.Other import ModColor

class ClassPrint():
    def __init__(self,HW=20,quote='"'):
        self.LeftW=HW
        self.WV0=50
        self.WV1=30
        self.WidthHelp=30
        self.quote=quote
        self.proto=" - %s %s %s : "
        self.Lproto=len(self.proto.replace("%s",""))


    def getWidth(self):
        rows, columns = os.popen('stty size', 'r').read().split()
        return int(columns)

    def Print(self,par,value,value2=None):
        parout=" - %s %s"%(par,"."*(self.LeftW-len(par)))
        if value2==None:
            valueOut=value
        else:
            valueOut="%s%s"%(value.ljust(self.WV0),(""" "%s" """%value2).rjust(self.WV1))
        print("%s = %s"%(parout,valueOut))
        
    def Print2(self,par,value,helpit,col="white"):
        WidthTerm=self.getWidth()
        Lpar=len(str(par))
        Lval=len(str(value))
        SFill="."*max(self.LeftW-self.Lproto-Lpar-Lval,2)
        WidthHelp=WidthTerm-(self.Lproto+Lpar+Lval+len(SFill))
        Spar="%s"%ModColor.Str(str(par),col=col,Bold=False)

        Sval="%s"%ModColor.Str(str(value),col=col,Bold=False)