From 5a50fd532504a345c2ab7f5f162f16167a46c6f2 Mon Sep 17 00:00:00 2001 From: Rishikesh Date: Sun, 1 Jan 2017 17:50:16 +0530 Subject: [PATCH 1/2] For make raw_input compatible with python3 Fix issue #7388 --- examples/misc/multiprocess.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/misc/multiprocess.py b/examples/misc/multiprocess.py index 05cd7953c4bb..b19849088459 100644 --- a/examples/misc/multiprocess.py +++ b/examples/misc/multiprocess.py @@ -76,7 +76,9 @@ def main(): for ii in range(10): pl.plot() time.sleep(0.5) - raw_input('press Enter...') + try: input = raw_input + except NameError: pass + input('press Enter...') pl.plot(finished=True) if __name__ == '__main__': From fdf4d616ccae7244f367fad0f4297e73ff630fab Mon Sep 17 00:00:00 2001 From: Rishikesh Date: Tue, 3 Jan 2017 20:21:24 +0530 Subject: [PATCH 2/2] To remove pep8 warnings This commit remove the pep8 warning from this file --- examples/misc/multiprocess.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/misc/multiprocess.py b/examples/misc/multiprocess.py index b19849088459..b1230d464eef 100644 --- a/examples/misc/multiprocess.py +++ b/examples/misc/multiprocess.py @@ -76,8 +76,10 @@ def main(): for ii in range(10): pl.plot() time.sleep(0.5) - try: input = raw_input - except NameError: pass + try: + input = raw_input + except NameError: + pass input('press Enter...') pl.plot(finished=True)