Did I find the right examples for you? yes no

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)
class StringIO([buffer])

When a StringIO object is created, it can be initialized to an existing
string by passing the string to the constructor. If no string is given,
the StringIO will start empty.

The StringIO object can accept either Unicode or 8-bit strings, but
mixing the two may take some care. If both are used, 8-bit strings that
cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause
a UnicodeError to be raised when getvalue() is called.

src/b/d/bdist_mpkg-0.5.0/bdist_mpkg/pkg.py   bdist_mpkg(Download)
from .util import copy_tree
from .templates import InstallationCheck
from .py3k import StringIO, u
 
 
        readme_text = dist.get_long_description()
        if readme_text:
            readme = StringIO(readme_text)
 
    def doc(path, name, exts=TEXT_EXTS):

src/n/i/nibabel-1.3.0/nibabel/tests/test_wrapstruct.py   nibabel(Download)
from ..batteryrunners import Report
 
from ..py3k import BytesIO, StringIO, asbytes, ZEROB
from ..volumeutils import swapped_code, native_code, Recoder
from ..spatialimages import HeaderDataError
    def log_chk(self, hdr, level):
        # utility method to check header checking / logging
        # If level == 0, this header should always be OK
        str_io = StringIO()
        logger = logging.getLogger('test.logger')
        hdr = HC()
        # Make a new logger
        str_io = StringIO()
        logger = logging.getLogger('test.logger')
        logger.setLevel(20)

src/n/i/nibabel-1.3.0/nibabel/tests/test_batteryrunners.py   nibabel(Download)
'''
 
from ..py3k import StringIO
 
import logging
def test_report_strings():
    rep = Report()
    assert_not_equal(rep.__str__(), '')
    assert_equal(rep.message, '')
    str_io = StringIO()
def test_logging():
    rep = Report(ValueError, 20, 'msg', 'fix')
    str_io = StringIO()
    logger = logging.getLogger('test.logger')
    logger.setLevel(30) # defaultish level

src/n/i/nibabel-1.3.0/nibabel/tests/test_analyze.py   nibabel(Download)
import numpy as np
 
from ..py3k import BytesIO, StringIO, asbytes
from ..volumeutils import array_to_file
from ..spatialimages import (HeaderDataError, HeaderTypeError)
        hdr = HC()
        # Make a new logger
        str_io = StringIO()
        logger = logging.getLogger('test.logger')
        logger.setLevel(30) # defaultish level