This is my setup whenever I go to the REPL. There are three functions:
- cls() or clear() : This clears the screen.
- save_history(file=history_file) : Takes an argument for the name of the history file.
- run(pyfile: str | Path) : This takes a string or Path object representing a python script and then sends it to be compiled and executed. It will return either END OF PROGRAM for successful execution of python script or ERROR IN PROGRAM for unsuccessful.
- pythonstartup now is able to import the myrepl module file and use it's functions.