Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Streaming and Fileutils libraries to work with streams and files

Project Description

Streaming module

  • bstream class. This class is the analogue of the “str” class in Python 2 or “bytes” class in Python 3 and is used to operate with binary data. bstream class now has the same functions as the bytes and BytesIO classes. It also has functions to encode/decode using zlib or base64 algorythms.
  • ustream class. This class is the analogue of the “unicode” class in Python 2 or “str” class in Python 3 and is used to operate with Unicode data. ustream class now has the same functions as the unicode and StringIO classes. It also includes some functions from re module, but yet it is not full.
  • fstream class. This class is almost similar to file class in Python, but yet has no direct analogues as far as I know. This class can use gzip/bzip2/lzop/xz/lzma compression methods, using the corresponding applications. It’s a very good class for user who needs all the possibilities of gzip or bzip2 modules, but has some problems while using these modules (they are very slow when you work with large files and has problems when you are trying to write Unicode data or even encoded symbols, for example, from Russian alphabet). I’ve called this feature “filter”, because for user it looks the same as Boost filters (though it uses another algorithm).
  • pstream class. This class is the analogue of the subprocess.Popen class, but it doesn’t have problems with Unicode and returns stdout by default (or if special flag was specified it returns code of error and its message).

This module can operate with str, unicode, QByteArray and QString types. It detects type of the object and then performs the neccessary operations.

Fileutils module

The most part is similar to os, os.path and shutils modules, but it also has other useful functions:

  • cat function. This function is the analogue of the default Linux cat application, but it has one great advantage: it can get the content of the compressed file (see above about fstream class).
  • compress function. Used to compress one file to another using filters (see above about fstream class).
  • decompress function. Used to decompress one file to another using filters (see above about fstream class).
  • magic function. This function is the analogue for default Linux file application. It returns mimetype of the file.
Release History

Release History

This version
History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
streaming-fileutils-linux-0.2.tar.gz (571.9 kB) Copy SHA256 Checksum SHA256 2.7 Dumb Binary Mar 26, 2012
streaming-fileutils-linux-source-0.2.tar.gz (72.7 kB) Copy SHA256 Checksum SHA256 Source Mar 26, 2012
streaming-fileutils-win32-0.2.tar.gz (816.9 kB) Copy SHA256 Checksum SHA256 2.7 Dumb Binary Mar 26, 2012
streaming-fileutils-win32-source-0.2.tar.gz (583.3 kB) Copy SHA256 Checksum SHA256 Source Mar 26, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting