(*args)
return '\n'.join(result), newBaseline
Put a string of stringPicts next to each other.
        Returns string, baseline arguments for stringPict.
Put a string of stringPicts next to each other.
        Returns string, baseline arguments for stringPict.
Put a string of stringPicts next to each other . Returns string baseline arguments for stringPict .
def next(*args):
        """Put a string of stringPicts next to each other.
        Returns string, baseline arguments for stringPict.
        """
        #convert everything to stringPicts
        objects = []
        for arg in args:
            if isinstance(arg, string_types):
                arg = stringPict(arg)
            objects.append(arg)

        #make a list of pictures, with equal height and baseline
        newBaseline = max(obj.baseline for obj in objects)
        newHeightBelowBaseline = max(
            obj.height() - obj.baseline
            for obj in objects)
        newHeight = newBaseline + newHeightBelowBaseline

        pictures = []
        for obj in objects:
            oneEmptyLine = [' '*obj.width()]
            basePadding = newBaseline - obj.baseline
            totalPadding = newHeight - obj.height()
            pictures.append(
                oneEmptyLine * basePadding +
                obj.picture +
                oneEmptyLine * (totalPadding - basePadding))

        result = [''.join(lines) for lines in zip(*pictures)]
        return '\n'.join(result), newBaseline
def next ( * args ) : #convert everything to stringPicts objects = [ ] for arg in args : if isinstance ( arg , string_types ) : arg = stringPict ( arg ) objects . append ( arg ) #make a list of pictures, with equal height and baseline newBaseline = max ( obj . baseline for obj in objects ) newHeightBelowBaseline = max ( obj . height ( ) - obj . baseline for obj in objects ) newHeight = newBaseline + newHeightBelowBaseline pictures = [ ] for obj in objects : oneEmptyLine = [ ' ' * obj . width ( ) ] basePadding = newBaseline - obj . baseline totalPadding = newHeight - obj . height ( ) pictures . append ( oneEmptyLine * basePadding + obj . picture + oneEmptyLine * ( totalPadding - basePadding ) ) result = [ '' . join ( lines ) for lines in zip ( * pictures ) ] return '\n' . join ( result ) , newBaseline