Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.166.212 Times

filelike 0.4.1

Company: Ryan Kelly
Date Added: September 20, 2013  |  Visits: 472

filelike

Report Broken Link
Printer Friendly Version


Product Homepage
Download (35 downloads)



filelike is a Python library for creating and handling file-like objects.<br /><br />This module takes care of the groundwork for implementing and manipulating objects that provide a rich file-like interface, including reading, writing, seeking and iteration. It also provides a number of useful classes built on top of this functionality.<br /><br />The main class is FileLikeBase, which implements the entire file-like interface on top of primitive _read(), _write(), _seek() and _tell() methods. Subclasses may implement any or all of these methods to obtain the related higher-level file behaviors.<br /><br />It also provides some nifty file-handling functions:<br /><br />* open: mirrors the standard open() function but is much cleverer;<br /><br /> URLs are automatically fetched, .bz2 files are transparently decompressed, and so-on.<br /><br />* join: concatenate multiple file-like objects together so that they<br /><br /> act like a single file.<br /><br />* slice: access a section of a file-like object as if it were an independent file.<br /><br />The "wrappers" subpackage contains a collection of useful classes built on top of this framework. These include:<br /><br />* Translate: pass file contents through an arbitrary translation<br /><br /> function (e.g. compression, encryption, ...)<br /><br />* Decrypt: on-the-fly reading and writing to an encrypted file<br /><br /> (using PEP272 cipher API)<br /><br />* UnBZip2: on-the-fly decompression of bzip'd files<br /><br />(like the standard library's bz2 module, but accepts any file-like object)<br /><br />As an example of the type of thing this module is designed to achieve, here's how the Decrypt wrapper can be used to transparently access an encrypted file:<br /><br /># Create the decryption key from Crypto.Cipher import DES cipher = DES.new('abcdefgh',DES.MODE_ECB) # Open the encrypted file from filelike.wrappers import Decrypt f = Decrypt(file("some_encrypted_file.bin","r"),cipher)<br /><br />The object in 'f' now behaves as a file-like object, transparently decrypting the file on-the-fly as it is read.<br /><br />The "pipeline" subpackage contains facilities for composing these wrappers in the form of a unix pipeline. In the following example, 'f' will read the first five lines of an encrypted file:<br /><br />from filelike.pipeline import Decrypt, Head f = file("some_encrypted_file.bin") > Decrypt(cipher) | Head(lines=5)<br /><br />Finally, two utility functions are provided for when code expects to deal with file-like objects:<br /><br />* is_filelike(obj): checks that an object is file-like<br />* to_filelike(obj): wraps a variety of objects in a file-like interface

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: 039f039 Access Built Classes Decrypt Encrypted Filelike Function Functions Import Interface Methods Module Object Objects Onthefly Standard Transparently
Users rating: 0/10

License: Freeware Size: 40.96 KB
USER REVIEWS
More Reviews or Write Review


FILELIKE RELATED
Database Tools  -  Har DB Classes 1.0
Har DB Classes provides two classes that implement the same database abstraction interface for accessing either Microsoft Access databases and other databases via ODBC.Har DB Classes for accessing Microsoft Access databases uses Window COM ADODB...
10 KB  
Modules  -  Private Number 5.x- 1.0
These numbers are displayed as Ending in 123 for users without view private number access permissions, and optionally encrypted with a md5 block cipher in 128bit CFB mode. The private number fields can benefit from validation patterns in order to...
 
Modules  -  Private Number 5.x- 1.0
These numbers are displayed as Ending in 123 for users without view private number access permissions, and optionally encrypted with a md5 block cipher in 128bit CFB mode. The private number fields can benefit from validation patterns in order to...
 
Modules  -  Private Number 5.x- 1.0
These numbers are displayed as Ending in 123 for users without view private number access permissions, and optionally encrypted with a md5 block cipher in 128bit CFB mode. The private number fields can benefit from validation patterns in order to...
 
HTML Database Converters  -  Easy Access 2.1
Easy Access is free database application that can help you to view, create and edit MS Access database files (mdb, accdb). Using nice looking user interface you are able to work with database tables, view and run queries, list, add and delete...
508 KB  
Content Management  -  Ariadne for Scripts 2.6
Ariadne is an Open Source, Multilingual Web Application Server and Content Management System built on PHP. Ariadne has a rich user interface which includes wizards, pulldown menus, and an extremely flexible and easy to use WYSIWYG editor.Ariadne...
102.4 KB  
Password Managers  -  The Password Saver 1.0.0.1
Store all your passwords for easy access in one secure, encrypted location. This password software encrypts the information in a secure file on your local hard drive to protect it from hackers, co-workers or family members, and identity thieves.
2.57 MB  
Libraries  -  libferrisstreams 0.5.0
libferrisstreams is a collection of base classes for custom std::basic_streambuf subclasses, SigC signals fired when streambuf objects are about to be deleted, relative URL handling, easy reference counting on streambuf objects, a collection of...
337.92 KB  
Libraries  -  Willowgarden DP 2
Willowgarden project is a PHP 5 rapid development platform for that provides an extensible environment for developing Web sites featuring support for pretty REST-style URLs, easy security, observable events, a simple object-based "code + view"...
706.56 KB  
Security Tools  -  Encrypt4all Home Edition 1.4
Encrypt4all is a powerful encryption software used to store your private documents into a single encrypted archive, implements a real bit-per-bit data encryption, encrypt any types of file, encrypt files larger than 4 gigabyte, folder protection...
1.26 MB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB