def run_2to3(files, fixer_names=None, options=None, explicit=None):
 if (not files):
  return
 from lib2to3.refactor import RefactoringTool, get_fixers_from_package
 class DistutilsRefactoringTool(RefactoringTool, ):
  def log_error(self, msg, *args, **kw):
   log.error(msg, *args)
  def log_message(self, msg, *args):
   log.info(msg, *args)
  def log_debug(self, msg, *args):
   log.debug(msg, *args)
 if (fixer_names is None):
  fixer_names = get_fixers_from_package('lib2to3.fixes')
 r = DistutilsRefactoringTool(fixer_names, options=options)
 r.refactor(files, write=True)

def run_2to3 ( files , fixer_names = None , options = None , explicit = None ) : if ( not files ) : return from lib2to3 . refactor import RefactoringTool , get_fixers_from_package class DistutilsRefactoringTool ( RefactoringTool , ) : def log_error ( self , msg , * args , ** kw ) : log . error ( msg , * args ) def log_message ( self , msg , * args ) : log . info ( msg , * args ) def log_debug ( self , msg , * args ) : log . debug ( msg , * args ) if ( fixer_names is None ) : fixer_names = get_fixers_from_package ( 'lib2to3.fixes' ) r = DistutilsRefactoringTool ( fixer_names , options = options ) r . refactor ( files , write = True )
invoke 2to3 on a list of python files .