Exemplo n.º 1
0
def ZInfo( w = 2 ) :
    """Prints a list of Z, symbol and name for most elements."""

    n = endl_Z.endl_nZs( )
    Zs = []
    Z = 0
    while( Z < n ) :
        Zs.append( "%4d %4s %15s" % ( Z, endl_Z.endl_ZSymbol( Z ), endl_Z.endl_ZLabel( Z ) ) )
        Z += 1
    brb.tylist( Zs, w = w, sep = "  |" )
Exemplo n.º 2
0
def CInfo( w = 4 ) :
    """Prints a list of C and brief description for supported C-values."""

    n = endl_C.endl_nCMax( )
    l = endl_C.endl_CLabelMaxWidth( )
    if( l < 4 ) : l = 4
    Fmt = "%%4d %%%ds" % l
    Cs = []
    i = 1
    while( i <= n ) :
        s = endl_C.endl_CLabel( i )
        if( s is None ) : s = "----"
        Cs.append( Fmt % ( i, s ) )
        i += 1
    brb.tylist( Cs, w = w, sep = "  |" )
Exemplo n.º 3
0
    def ll(self, Z=None, A=None, suffix="", w=5):
        """Prints a table of all ZA directories in self's default source database that match Z and A.  The table is printed with w columns."""

        try:
            zalist = self.ZAList(Z=Z, A=A, suffix=suffix)
        except:
            zalist = ["No default database"]
        l = 0
        for za in zalist:
            l = max(l, len(za))
        Fmt = "%%-%ds" % l
        zal = []
        for za in zalist:
            zal.append(Fmt % za)
        brb.tylist(zal, w)
        print
        self.ls()