skip to navigation
skip to content

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))

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


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 can be any callable object that takes an item — a directory or a file — and performs some operation on it.


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