prompt-toolkit / ptpython

A better Python REPL
BSD 3-Clause "New" or "Revised" License
5.19k stars 277 forks source link

[Feature Request], provide `code.InteractiveConsole`-like apis and classes #539

Open evan0greenup opened 1 year ago

evan0greenup commented 1 year ago

There is code.InteractiveConsole in standard library.

It would be nice for ptpython to provide a drop-in replacement interface to replace code.InteractiveConsole.

Currently, there is no method like runsource() or runcode() in ptpython.repl.PythonRepl.

Add compatible support would make more users who get used to use code.InteractiveConsole be more easy to use ptpython.

ahopkins commented 10 months ago

Agreed. Would love this as well.