[Checkins] SVN: zope.fixers/trunk/README.txt quick usage info.

Lennart Regebro regebro at gmail.com
Sat Sep 12 06:59:13 EDT 2009


Log message for revision 103859:
  quick usage info.
  

Changed:
  U   zope.fixers/trunk/README.txt

-=-
Modified: zope.fixers/trunk/README.txt
===================================================================
--- zope.fixers/trunk/README.txt	2009-09-12 10:35:54 UTC (rev 103858)
+++ zope.fixers/trunk/README.txt	2009-09-12 10:59:13 UTC (rev 103859)
@@ -14,4 +14,19 @@
 Usage
 -----
 
-TODO!
+To use this you typically want all teh fixers from lib2to3, and add the
+fixers from zope.fixers to it. Like so:
+
+    >>> from lib2to3.refactor import RefactoringTool, get_fixers_from_package
+    >>> fixers = get_fixers_from_package('lib2to3.fixes') + \
+    ...          get_fixers_from_package('zope.fixers')
+
+And the run the fixing with the fixers:
+
+    >>> tool = RefactoringTool(fixers)
+    >>> tool.refactor(files, write=True)
+
+For an example usage within setuptools, look at:
+
+http://svn.zope.org/zope.interface/branches/regebro-python3/build_ext_3.py?rev=98993&view=markup
+



More information about the checkins mailing list