skip to navigation
skip to content

Not Logged In

ipe 0.1.1

Load, modify and store file trees

Ipê loads a directory into a file tree and allows you to modify it using simple tools. When you're done, you can store the tree back to disk.

import ipe

def remove_pyc_files(item):
    if item.is_file and item.extension == '.pyc':
        print('Removing {0}'.format(item.abspath))
        item.parent.remove(item)

dir = ipe.load_tree('./ipe')
ipe.modify(tree = dir, toolbox = [remove_pyc_files])
ipe.store_tree(dir, './ipe-clean')

Trees

Ipê trees have two kinds of items: directories and files. Nothing special. The items support a bunch of operations that simplify renaming, reparenting, getting and setting the contents of files, and creating new items.

Tools

Tools can be any callable object that takes an item — a directory or a file — and performs some operation on it.

API

There's no API documentation yet. It's in my todo list.

 
File Type Py Version Uploaded on Size
ipe-0.1.1-py2.7.egg (md5) Python Egg 2.7 2012-07-15 17KB
  • Downloads (All Versions):
  • 2 downloads in the last day
  • 18 downloads in the last week
  • 96 downloads in the last month