code: def recompile_all(path):
      
      import os
      if os.path.isdir(path):
          for root, dirs, files in os.walk(path):
              for name in files:
                  if name.endswith('.py'):
                      filename = os.path.abspath(os.path.join(root, name))
                      print >> sys.stderr, filename
                      recompile(filename)
      else:
          filename = os.path.abspath(path)
          recompile(filename)
docs: recursively recompile all .py files in the directory