logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

fix_raw_input.py (454B)


  1. """Fixer that changes raw_input(...) into input(...)."""
  2. # Author: Andre Roberge
  3. # Local imports
  4. from .. import fixer_base
  5. from ..fixer_util import Name
  6. class FixRawInput(fixer_base.BaseFix):
  7. BM_compatible = True
  8. PATTERN = """
  9. power< name='raw_input' trailer< '(' [any] ')' > any* >
  10. """
  11. def transform(self, node, results):
  12. name = results["name"]
  13. name.replace(Name("input", prefix=name.prefix))