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.335.228 Times

PyProxyFS 0.8

Company: Nic Ferrier
Date Added: August 02, 2013  |  Visits: 211

PyProxyFS

Report Broken Link
Printer Friendly Version


Product Homepage
Download (39 downloads)



Simple filesystem abstraction<br /><br />PyProxyFS is a proxy filesystem interface with a native filesystem implementation and a very simple test in-memory filesystem.<br /><br />The aim of pyproxyfs is to provide a filesystem class that you can use for doing much of your file handling... but that can easi;ly be mocked for specific testing purposes.<br /><br />If, instead of using open, os.rename and os.listdir you use the pyproxyfs equivalents you can expect to be able to make a simple filesystem using the builtin TestFS class and write tests around that.<br /><br />For example:<br /><br />def show_conf_files(dirtolist, filesystem=None):<br /> from pyproxyfs import Filesystem<br /> if not filesystem:<br /> filesystem = Filesystem()<br /> files = filesystem.listdir(dirtolist)<br /> import re<br /> cfgpat = re.compile(".*.cfg$")<br /> cfg_files = [fn for fn in files if cfgpat.match(fn)]<br /> return cfg_files<br /><br />this might be your application code.<br /><br />You could then test it relatively simply:<br /><br />def test_show_conf_files():<br /> """<br />>>> test_show_conf_files()<br />['a.cfg', 'b.cfg']<br />"""<br /> from pyproxyfs import TestFS<br /> fs = TestFS({<br /> "somedir/a.cfg": "",<br /> "somedir/a.txt": "",<br /> "somedir/b.cfg": "",<br /> "somedir/run.py": ""<br /> })<br /> return show_conf_files("somedir", filesystem=fs)<br /><br />#md5=0457d51d270d68a47188b77dcdc45e04

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Application Cfg Files Cfg Filesthis Cfgpat Cfgpatmatchfn Class Files Filesystem Filesystemlistdirdirtolist Import Pyproxyfs Quotquot Recompilequotcfgquot Return Simple Simplydef Testfs
Users rating: 0/10

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


PYPROXYFS RELATED
Development Tools  -  JBoss Application Server 5.0.0 CR1 1.0
JBoss Application Server (JBoss AS) is the market-leading, open source Java 2 Enterprise Edition (J2EETM) application server, delivering a high-performance, enterprise-class platform for developing and deploying e-business applications.JBoss AS...
 
Programming  -  Grass - Configuration Files Builder 1.3
Grass is a utility for generating the application configuration files for different deployable target environments.
87.29 KB  
Automation Tools  -  StarDeploy 1.2.5
StarDeploy is software that installs packaged an unpackaged application and files to Mac OS X clients. StarDeploy has be developed to deploy under many network condition allowing for onsite or cloud deployment off site. StarDeploy is simple to...
3.26 MB  
Libraries  -  Class::InsideOut 1.02
Class::InsideOut is a Perl module with a safe, simple inside-out object construction kit. SYNOPSIS package My::Class; use Class::InsideOut qw( public private register id ); public name => my %name; # accessor: name() private age => my...
48.13 KB  
Libraries  -  Class::Date 1.1.9
Class::Date is a perl module, which provides a simple date type for perl. You can create new Class::Date objects with a constructor from different scalar formats, array refs, and hash refs, and then you can easily manipulate it by the builtin...
34.82 KB  
Home & Leisure  -  Spyware Terminator Database Update 5.003.001.001
If you want to download the Spyware Terminator database of software without needing to download the application update files, just click on the download link and extract the downloaded file to the "Spyware Terminator" folder. If you use version...
 
Development Editors  -  Spring BeanDoc 0.9.0 Beta
Spring BeanDoc is an accessible utility that documents and graphs Spring bean factories and application context files. Though very easy to use, it is designed to be flexible and extensible to meet most needs. Spring BeanDoc can help you and...
 
Development Editors  -  PAD Fab for Mac 2.1
PAD Fab is a free Mac utility that allows software authors to create and maintain PAD (Portable Application Description) files. PAD files provide a standard way for software authors to provide product descriptions and specifications to online...
819 KB  
Book Collection Managers  -  Atlence FileTime Manager 3.0
Atlence FileTime Manager allows you to change the timestamp of files and folders on your computer by a simple click or by automation. The application can also monitor any change in date/time of your files and folders and notify you or perform a...
3.91 MB  
Finance  -  Makagiga Portable 4.0
Makagiga is a free, easy-to-use, cross-platform application for doing a variety of tasks, such as todo listing, feed reading, text editing and simple image editing / viewing. Plugins are used to implement its various capabilities. MakaGiga is...
3.2 MB  
NEW DOWNLOADS IN SHELL & DESKTOP, FILE UTILITIES
Shell & Desktop  -  Glunarclock 0.32.4
GNOME Lunar Clock Applet displays the current phase of the Moon as an applet for the gnome panel. In the properties box you can choose between a real image Features Pointing with the mouse at the applet...
522.24 KB  
Shell & Desktop  -  Fekete 5
Icon theme for Linux For all possible desktop, and Linux distro Special additives: Suse's Yast icons. Xfce system icons, and archaic mimetypes icons Mandriva "special placed" status icons. Libreoffice icons.
71.59 MB  
Shell & Desktop  -  XFast 0.9
XFast is a slim and lightweighted desktop environment that incorporates X and Window Manager within the same project.
1.15 MB  
Shell & Desktop  -  print selection konqueror service menu 0.1
This service menu give you a *silly* way to print fast your selection on konqueror USE select the text copy the text rigt button on the webpage select print selection a kdialog will appear paste the text
10.24 KB  
Shell & Desktop  -  Faenza 1.2
Faenza icon theme is available to install for Ubuntu users via a PPA repository. View the README file for instructions and a list of known issues.
23.49 MB  
File Utilities  -  Active@ KillDisk Linux Console 9.1.1110
Active@ KillDisk for Linux (Console) is a powerful utility that will: wipe confidential data from unused space on your hard drive; erase data from partitions or from an entire hard disk; destroy data permanently. Active@ KillDisk for Linux...
11.07 MB  
File Utilities  -  Metalinks 5.1
Metalinks is a project to facilitate data distribution over mirrors and P2P networks. It does so by defining an XML format and the tools to handle these. The metalink files contain all the information needed to download and verify files.
5.05 MB  
File Utilities  -  PUFS 0.0.2c
PUFS - Peer Union File System - is a poor man's na???ve distributed file system built on top of FUSE, hence running totally in user space. The project is distributed under the GPL license. PUFS' philosophy is somewhat in line...
408.58 KB  
File Utilities  -  frfs 0.0.3
frfs implements a fully functional in-RAM filesystem using the FUSE framework. Overview: With Linux, creating RAM-backed file system is easy: su to root, mount a tmpfs some place, come back to plain user. Ah, but...
153.6 KB  
File Utilities  -  twander 3.231
'twander' is a macro-programmable Filesystem Browser that runs on both Unix-like systems as well as Win32 systems. It embraces the best ideas of both similar GUI-driven programs (Konqueror, Windows Explorer) as well as text-based interfaces...
737.28 KB