• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(303)  |  Call(298)  |  Derive(0)  |  Import(5)
ljust(s, width[, fillchar]) -> string

Return a left-justified version of s, in a field of the
specified width, padded with spaces as needed.  The string is
never truncated.  If specified the fillchar is used instead of spaces.

        def ljust(s, width, *args):
    """ljust(s, width[, fillchar]) -> string

    Return a left-justified version of s, in a field of the
    specified width, padded with spaces as needed.  The string is
    never truncated.  If specified the fillchar is used instead of spaces.

    """
    return s.ljust(width, *args)
        


src/c/a/cavity-search-HEAD/trunk/cs_utils.py   cavity-search(Download)
from global_constants import *
import logging
from sys import stdout
from string import rjust, ljust
 
"""-------------------------------------------------------------------------"""
"""                               LOG                                       """
            atom_entry += rjust("%d"%(i+1),\
                                       PDBatom.GetFieldLen(PDBatom.serial))
            atom_entry += "  "
            atom_entry += ljust("%s"%atom.atom_type(),\
                                       PDBatom.GetFieldLen(PDBatom.aname))
            atom_entry += ljust("%s"%atom.altloc(),\
                                       PDBatom.GetFieldLen(PDBatom.altloc))
            atom_entry += ljust("%s"%atom.res_type(),\

src/c/o/compmake-HEAD/compmake/ui/helpers.py   compmake(Download)
import sys
from collections import namedtuple 
from compmake.utils.visualization import colored
import types
from compmake.structures import UserError
from string import ljust
 
            cmd = commands[name]
            short_doc = cmd.doc.split('\n')[0].strip()
            file.write("  | %s  %s\n" % 
                       (colored(ljust(name, max_len), attrs=['bold']), short_doc))
 
 
# FIXME: put this somewhere else

src/c/o/compmake-0.9.3/compmake/ui/helpers.py   compmake(Download)
import sys
from collections import namedtuple 
from compmake.utils.visualization import colored
import types
from compmake.structures import UserError
from string import ljust
 
            cmd = commands[name]
            short_doc = cmd.doc.split('\n')[0].strip()
            file.write("  | %s  %s\n" % 
                       (colored(ljust(name, max_len), attrs=['bold']), short_doc))
 
 
# FIXME: put this somewhere else

src/c/a/cavity-search-HEAD/trunk/protein_class.py   cavity-search(Download)
from file_class import *
from math import floor, ceil
from operator import add, sub
from string import upper, ljust, rjust
from rotation import *
import logging
 

src/i/t/itools-HEAD/test/bench_xml.py   itools(Download)
from math import log as math_log
from optparse import OptionParser
from os.path import join
from string import center, ljust, rjust
from subprocess import call
from tarfile import open as open_tar
 
def output_result(results, file):
    # file output
    filename, file_size = file
    filename = ljust(filename[:19], 19)
    file_size = get_string_size(file_size)
    file_size = rjust(file_size[:9], 9)
    file_string = u'%s  %s' % (filename, file_size)