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

All Samples(5)  |  Call(0)  |  Derive(0)  |  Import(5)

src/i/p/ipython-HEAD/IPython/utils/io.py   ipython(Download)
import tempfile
from .capture import CapturedIO, capture_output
from .py3compat import string_types, input, PY3
 
#-----------------------------------------------------------------------------
    assert stream in ('stdout', 'stderr')
    stream  = getattr(sys, stream)
    if PY3:
        try:
            stream_b = stream.buffer

src/i/p/ipython-2.0.0/IPython/utils/io.py   ipython(Download)
import tempfile
from .capture import CapturedIO, capture_output
from .py3compat import string_types, input, PY3
 
#-----------------------------------------------------------------------------
    assert stream in ('stdout', 'stderr')
    stream  = getattr(sys, stream)
    if PY3:
        try:
            stream_b = stream.buffer

src/o/p/openmm-0.2/ipcfg/IPython/traitlets.py   openmm(Download)
    """
    the_type = type(obj)
    if (not py3compat.PY3) and the_type is InstanceType:
        # Old-style class.
        the_type = obj.__class__
    def error(self, obj, value):
        kind = type(value)
        if (not py3compat.PY3) and kind is InstanceType:
            msg = 'class %s' % value.__class__.__name__
        else:
            self.error(obj, value)
 
if py3compat.PY3:
    Long, CLong = Int, CInt
    Integer = Int
    info_text = "a valid object identifier in Python"
 
    if py3compat.PY3:
        # Python 3:
        coerce_str = staticmethod(lambda _,s: s)

src/p/y/PyRDFa-HEAD/pyRdfa/__init__.py   PyRDFa(Download)
								break
						self.options.set_host_language(self.media_type)
					from py3compat import PY3
					if PY3:
						return open(name, 'rb')

src/p/y/python-epc-HEAD/epc/tests/utils.py   python-epc(Download)
from contextlib import contextmanager
 
from ..py3compat import Queue, PY3
from ..utils import newthread
 
def streamio():
    """
    Return `io.StringIO` for Python 3, otherwise `io.BytesIO`.
    """
    if PY3:

src/e/p/epc-0.0.5/epc/tests/utils.py   epc(Download)
from contextlib import contextmanager
 
from ..py3compat import Queue, PY3
from ..utils import newthread
 
def streamio():
    """
    Return `io.StringIO` for Python 3, otherwise `io.BytesIO`.
    """
    if PY3: