Package lemon :: Package external :: Package Cheetah :: Module FileUtils
[show private | hide private]
[frames | no frames]

Module lemon.external.Cheetah.FileUtils

File utitilies for Python:

Meta-Data
================================================================================
Author: Tavis Rudd <tavis@damnsimple.com>
License: This software is released for unlimited distribution under the
         terms of the Python license.
Version: $Revision: 1.1 $
Start Date: 2001/09/26
Last Revision Date: $Date: 2003/08/12 09:17:11 $

Classes
FileFinder Traverses a directory tree and finds all files in it that match one of the specified glob patterns.
FindAndReplace Find and replace all instances of 'patternOrRE' with 'replacement' for each file in the 'files' list.
SourceFileStats  

Function Summary
  findFiles(*args, **kw)
Recursively find all the files matching a glob pattern.
  replaceRegexInFiles(files, pattern, repl)
Replace all instances of regex 'pattern' with 'repl' for each file in the 'files' list.
  replaceStrInFiles(files, theStr, repl)
Replace all instances of 'theStr' with 'repl' for each file in the 'files' list.

Variable Summary
str __author__ = 'Tavis Rudd <tavis@damnsimple.com>'
str __revision__ = '1.1'
bool False = False
bool True = True

Function Details

findFiles(*args, **kw)

Recursively find all the files matching a glob pattern.

This function is a wrapper around the FileFinder class.  See its docstring
for details about the accepted arguments, etc.

replaceRegexInFiles(files, pattern, repl)

Replace all instances of regex 'pattern' with 'repl' for each file in the
'files' list. Returns a dictionary with data about the matches found.

This is like re.sub on a multi-file basis.

This function is a wrapper around the FindAndReplace class. See its
docstring for more details.

replaceStrInFiles(files, theStr, repl)

Replace all instances of 'theStr' with 'repl' for each file in the 'files'
list. Returns a dictionary with data about the matches found.

This is like string.replace() on a multi-file basis.

This function is a wrapper around the FindAndReplace class. See its
docstring for more details.

Variable Details

__author__

Type:
str
Value:
'Tavis Rudd <tavis@damnsimple.com>'                                    

__revision__

Type:
str
Value:
'1.1'                                                                  

False

Type:
bool
Value:
False                                                                  

True

Type:
bool
Value:
True                                                                   

Generated by Epydoc 2.0 on Mon Nov 10 15:07:48 2003 http://epydoc.sf.net