Source

pypy / pypy / module / _io / __init__.py

from pypy.interpreter.mixedmodule import MixedModule

class Module(MixedModule):

    appleveldefs = {
    }

    interpleveldefs = {
        'DEFAULT_BUFFER_SIZE': 'space.wrap(interp_iobase.DEFAULT_BUFFER_SIZE)',
        'BlockingIOError': 'interp_io.W_BlockingIOError',
        'UnsupportedOperation':
            'space.fromcache(interp_io.Cache).w_unsupportedoperation',
        '_IOBase': 'interp_iobase.W_IOBase',
        '_RawIOBase': 'interp_iobase.W_RawIOBase',
        '_BufferedIOBase': 'interp_bufferedio.W_BufferedIOBase',
        '_TextIOBase': 'interp_textio.W_TextIOBase',

        'FileIO': 'interp_fileio.W_FileIO',
        'BytesIO': 'interp_bytesio.W_BytesIO',
        'StringIO': 'interp_stringio.W_StringIO',
        'BufferedReader': 'interp_bufferedio.W_BufferedReader',
        'BufferedWriter': 'interp_bufferedio.W_BufferedWriter',
        'BufferedRWPair': 'interp_bufferedio.W_BufferedRWPair',
        'BufferedRandom': 'interp_bufferedio.W_BufferedRandom',
        'TextIOWrapper': 'interp_textio.W_TextIOWrapper',

        'open': 'interp_io.open',
        'IncrementalNewlineDecoder': 'interp_textio.W_IncrementalNewlineDecoder',
    }

    def shutdown(self, space):
        # at shutdown, flush all open streams.  Ignore I/O errors.
        from pypy.module._io.interp_iobase import get_autoflusher
        get_autoflusher(space).flush_all(space)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.