Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(8) | Call(4) | Derive(0) | Import(4)
Convert the given bytes or string object to string
def tostring(b): """ Convert the given bytes or string object to string """ if isinstance(b, bytes): return bytes2str(b) else: return b
from .outputformatter import OutputFormatter from .py3compat import tostring from .utils import decode_colorama_color from . import colorama
def _emit(self, str): """ Write the string to the stream. """ self.stream.write(tostring(str))
src/p/s/pss-1.39/psslib/contentmatcher.py pss(Download)
import sys from .py3compat import tostring from .matchresult import MatchResult
def _pattern_is_simple(self, pattern): """ A "simple" pattern that can be matched with str.find and doesn't require a regex engine. """ return bool(re.match('[\w_]+$', tostring(pattern)))
src/p/s/pss-HEAD/psslib/defaultpssoutputformatter.py pss(Download)
from .outputformatter import OutputFormatter from .py3compat import tostring from .utils import decode_colorama_color from . import colorama
def _emit(self, str): """ Write the string to the stream. """ self.stream.write(tostring(str))
src/p/s/pss-HEAD/psslib/contentmatcher.py pss(Download)
import sys from .py3compat import tostring from .matchresult import MatchResult
def _pattern_is_simple(self, pattern): """ A "simple" pattern that can be matched with str.find and doesn't require a regex engine. """ return bool(re.match('[\w_]+$', tostring(pattern)))