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()