1 """Fixer that changes raw_input(...) into input(...)."""
2 # Author: Andre Roberge
3
4 # Local imports
5 from .. import fixer_base
6 from ..fixer_util import Name
7
8 class ESC[4;38;5;81mFixRawInput(ESC[4;38;5;149mfixer_baseESC[4;38;5;149m.ESC[4;38;5;149mBaseFix):
9
10 BM_compatible = True
11 PATTERN = """
12 power< name='raw_input' trailer< '(' [any] ')' > any* >
13 """
14
15 def transform(self, node, results):
16 name = results["name"]
17 name.replace(Name("input", prefix=name.prefix))