ó
ÐH/\c           @@  s­   d  Z  d d l m Z d d l m Z d d d d g Z y d d l m Z Wn e k
 rl e j d ƒ n X[ d d	 l	 m
 Z
 d d
 l m Z d d l m Z e j Z d S(   sï  
Wrappers to make file-like objects cooperative.

.. class:: FileObject

   The main entry point to the file-like gevent-compatible behaviour. It will be defined
   to be the best available implementation.

There are two main implementations of ``FileObject``. On all systems,
there is :class:`FileObjectThread` which uses the built-in native
threadpool to avoid blocking the entire interpreter. On UNIX systems
(those that support the :mod:`fcntl` module), there is also
:class:`FileObjectPosix` which uses native non-blocking semantics.

A third class, :class:`FileObjectBlock`, is simply a wrapper that executes everything
synchronously (and so is not gevent-compatible). It is provided for testing and debugging
purposes.

Configuration
=============

You may change the default value for ``FileObject`` using the
``GEVENT_FILE`` environment variable. Set it to ``posix``, ``thread``,
or ``block`` to choose from :class:`FileObjectPosix`,
:class:`FileObjectThread` and :class:`FileObjectBlock`, respectively.
You may also set it to the fully qualified class name of another
object that implements the file interface to use one of your own
objects.

.. note:: The environment variable must be set at the time this module
   is first imported.

Classes
=======
i    (   t   absolute_import(   t   configt   FileObjectPosixt   FileObjectThreadt   FileObjectBlockt
   FileObject(   t   fcntl(   R   (   R   (   R   N(   t   __doc__t
   __future__R    t   gevent._configR   t   __all__R   t   ImportErrort   removet   gevent._fileobjectposixR   t   gevent._fileobjectcommonR   R   t
   fileobjectR   (    (    (    s0   lib/python2.7/site-packages/gevent/fileobject.pyt   <module>#   s   	