From 22a048ec4e3e85dbbc8f0848ef26e3a46eef20cb Mon Sep 17 00:00:00 2001 From: Cutipus Date: Wed, 25 Apr 2018 15:09:33 +0300 Subject: [PATCH] Fixed some things --- yes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yes.py b/yes.py index 40e7bb3..4b2233c 100644 --- a/yes.py +++ b/yes.py @@ -25,7 +25,7 @@ class Yes: return what if not suggestion.startswith('print('): - suggestion_ = f'print({suggestion}.__repr__())' + suggestion_ = f'print(({suggestion}).__repr__())' else: suggestion_ = suggestion @@ -39,6 +39,6 @@ class Yes: eval(suggestion_, globals(), locals) sys.stdout = old_stdout - return(f'>>> {suggestion} \n{eval_output.getvalue()[:-1]}') + return(f'{sys.ps1}{suggestion} \n{eval_output.getvalue()[:-1]}') yes = Yes()