Metadata-Version: 1.0
Name: pysendfile
Version: 2.0.0
Summary: A Python interface to sendfile(2)
Home-page: http://code.google.com/p/pysendfile/
Author: Giampaolo Rodola
Author-email: g.rodola@gmail.com
License: MIT
Download-URL: http://pysendfile.googlecode.com/files/pysendfile-2.0.0.tar.gz
Description: ===========
        Quick links
        ===========
        
        * Home page: http://code.google.com/p/pysendfile
        * Download: http://code.google.com/p/pysendfile/downloads/list
        
        =====
        About
        =====
        
        A python interface to sendfile(2) system call.
        
        =======
        Install
        =======
        
        $ sudo setup.py install
        
        ...or:
        
        $ easy_install pysendfile
        
        ===================
        Supported platforms
        ===================
        
        * Linux
        * OSX
        * FreeBSD
        * Dragon Fly BSD
        * SunOS
        * AIX (non properly tested)
        
        Python versions from 2.5 to 3.3 by using a single code base.
        
        =============
        Example usage
        =============
        
        ::
        
            import socket
            import errno
            from sendfile import sendfile
        
            file = open("somefile", "rb")
            sock = socket.socket()
            sock.connect(("127.0.0.1", 8021))
            offset = 0
        
            while 1:
                try:
                    sent = sendfile(sock.fileno(), file.fileno(), offset, 4096)
                except OSError, err:
                    if err.errno == (errno.EAGAIN, errno.EBUSY):  # retry
                        continue
                    raise
                else:
                    if sent == 0:
                        break  # done
                    offset += sent
        
Keywords: sendfile,python,performance,ftp
Platform: UNIX
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: POSIX :: BSD :: FreeBSD
Classifier: Operating System :: POSIX :: SunOS/Solaris
Classifier: Operating System :: POSIX :: AIX
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 2.4
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Operating System
Classifier: Topic :: Internet :: File Transfer Protocol (FTP)
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: License :: OSI Approved :: MIT License
