skip to navigation
skip to content

Not Logged In

butter 0.4

library to give python access to linux's more lower level features

Latest Version: 0.7

Butter is a library to integrate some of Linux's low level features into python eg signalfd, eventfd and timerfd. most of these functions are handy if you are looking into creating non-blocking servers, anything using select/poll and derivatives or writing server code

Whats Available

  • inotify (Complete support)
  • seccomp (Limited support)
  • fanotify (Limited support)

Whats Coming

Most of these exist in v0.2 as ctypes code. these are currently being rewritten to use cffi for speed and compatibility with pypy

  • signalfd
  • eventfd
  • timerfd
  • posix/linux aio (scatter/gather read writes with a completion based API instead of a 'ready' based interface, eg similar to IOCP on windows)

Design

The 'fd' apis have been designed first as thin wrappers around the underlying kernel syscalls. A File-like object that then uses these syscalls is then made available that obeys the 'event like' interface and is base on the interface provided by File and friends. They are intended to be drop in replacements and be used with the select module

Event-like objects

Event like objects are identical to filelike objects except they have the following extra methods to replace the disabled read/readline/write/writeline functionality

  • read_event: Return a single event
  • read_events: Return all cached events OR read all events from the kernel
 
File Type Py Version Uploaded on Size
butter-0.4.tar.bz2 (md5) Source 2013-12-12 9KB
butter-0.4.zip (md5) Source 2013-12-12 13KB
  • Downloads (All Versions):
  • 67 downloads in the last day
  • 442 downloads in the last week
  • 1735 downloads in the last month