Fixed some things
This commit is contained in:
parent
57192e6db7
commit
22a048ec4e
4
yes.py
4
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()
|
||||
|
|
Loading…
Reference in New Issue