{ "info": { "author": "Peter Ruibal", "author_email": "ruibalp@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux" ], "description": "fdinfo\n======\nfdinfo is a python library for using file descriptors in a more intuitive way.\n\nExamples\n========\n\nCreating a socket with SO_REUSEADR (or SO_REUSEPORT on BSD):\n\n.. code:: python\n\n from filedes import FD\n s = socket.socket()\n FD(s).socket.set_reuse()\n\nEnabling non-blocking mode on a PIPE\n\n.. code:: python\n\n import os\n from filedes import FD\n r, w = os.pipe()\n FD(r).set_nonblocking()\n\nDisabling the close on execute bit for a temporary file\n\n.. code:: python\n\n import tempfile\n from filedes import FD\n tf = tempfile.NamedTemporaryFile()\n FD(tf).set_cloexec(False)\n\nListing the open FDs and their types of the current PID:\n\n.. code:: python\n\n from filedes import FD, get_open_fds\n for fd in get_open_fds():\n print fd, FD(fd).typestr\n\nSending fds to another process over a unix socket\n\n.. code:: python\n\n from filedes import FD\n\n # Send a single FD\n FD(sock).socket.send_fd(an_fd)\n\n # Or for multiple FDs\n FD(sock).socket.send_fds(multiple_fds)\n\n # To receive one fd (in a different pid)\n an_fd = FD(sock).socket.recv_fd()\n\n # To receive multiple fds (in a different pid)\n two_fds = FD(sock).socket.recv_fds(2)\n\n\nKey features\n============\n* Get detailed info about fds in both the local as well as external processes\n* Perform fcntl and io operations directly on descriptor objects\n* Unittest helper class for making sure your tests don't leak fds or threads.\n* Set various fd flags in a more native way, such as `fd.set_cloexec()` or `fd.set_nonblocking()`\n* Socket helpers let you set socket options in a more native way, such as `fd.socket.set_reuse()`\n* A Popen() subclass with a more intelligent `close_fds` for systems with a high fs.file-max set\n\nPlatforms\n=========\nfdinfo is primarily developed on linux, but it doesn't work just there.\nIt has been tested on the following platforms:\n\n- linux\n- OSX\n\nDeveloping for Darwin is tricky since there is no procfs, so some\noperations on filedescriptors in different pids may not work as desired", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/fmoo/python-filedes/archive/0.1.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/fmoo/python-filedes", "keywords": "file-descriptor fd filedes", "license": "ISC", "maintainer": null, "maintainer_email": null, "name": "filedes", "package_url": "https://pypi.org/project/filedes/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/filedes/", "project_urls": { "Download": "https://github.com/fmoo/python-filedes/archive/0.1.1.tar.gz", "Homepage": "http://github.com/fmoo/python-filedes" }, "release_url": "https://pypi.org/project/filedes/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Work with file descriptors in a more human way", "version": "0.1.1" }, "last_serial": 611100, "releases": { "0.1.0": [], "0.1.1": [] }, "urls": [] }