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

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

Serving Software Downloads in 976 Categories, Downloaded 29.541.735 Times

filelike 0.4.1

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

filelike

Report Broken Link
Printer Friendly Version


Product Homepage
Download (18 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...
 
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  
Security Tools  -  Encrypt4all Professional 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.53 MB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
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  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB