Skip to main content

A simple cStringIO based FIFO, implemented as a circular buffer

Project description


Creative Commons CC-BY-SA 3.0, see README.TXT


1.0 Original Release
1.1 Changed write to look like other file operations and return a number
1.2 Added threading test and fixed bug with read/write stats, improved inspection slicing
1.3 Fix issue with stats printing if FIFO is not written
Improve debugging if multiple FIFO instances used. Added idle timer
1.4 Removed stream parameter from logging.StreamHandler() for python2.6 compatibility

Known Bugs:

None that I know of (eek)


All credit to the posting by Cameron on StackOverflow, here:


import csFIFO


f2.write("Hello World")
if not f2.isEmpty():
  #Print some stats
  print f2

#Non-destructive inspection
print f2[:5]
print f2[4:8]
print f2[-5:]
print f2.contents()


None that I know of

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for csFIFO, version 1.4
Filename, size File type Python version Upload date Hashes
Filename, size csFIFO-1.4-py2.6.egg (11.5 kB) File type Egg Python version 2.6 Upload date Hashes View
Filename, size csFIFO-1.4-py2.7.egg (11.5 kB) File type Egg Python version 2.7 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page