Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/s/e/seq_crumbs-HEAD/crumbs/utils/seq_utils.py   seq_crumbs(Download)
from multiprocessing import Pool
 
from crumbs.utils.tags import UPPERCASE, LOWERCASE, SWAPCASE
from crumbs.seq import get_description, get_name, get_str_seq, copy_seq
 
    def __init__(self, action):
        'The initiator'
        if action not in (UPPERCASE, LOWERCASE, SWAPCASE):
            msg = 'Action should be: uppercase, lowercase or invertcase'
            raise ValueError(msg)
            elif action == LOWERCASE:
                str_seq = str_seq.lower()
            elif action == SWAPCASE:
                str_seq = str_seq.swapcase()
            else:

src/s/e/seq_crumbs-HEAD/test/test_seq_utils.py   seq_crumbs(Download)
from crumbs.utils.seq_utils import (uppercase_length, ChangeCase,
                                    get_uppercase_segments)
from crumbs.utils.tags import SWAPCASE, UPPERCASE, LOWERCASE, SEQRECORD
from crumbs.seq import assing_kind_to_seqs, get_str_seq
 
        seqs = [SeqRecord(Seq('aCCg'))]
        seqs = assing_kind_to_seqs(SEQRECORD, seqs, None)
        change_case = ChangeCase(action=SWAPCASE)
        strs = [get_str_seq(s) for s in change_case(seqs)]
        assert strs == ['AccG']