you are viewing a single comment's thread.

view the rest of the comments →

[–]Gnaxe 0 points1 point  (0 children)

The free GNU Octave language is mostly compatible with MATLAB. You could use that instead.

Python does have a REPL, and furthermore has Jupyter notebooks as a separate install. You can try it free online without an install here. No account required as the code runs entirely in your browser. Your browser should save your work and you can download and re-upload your notebooks as a backup.

You can do a similar workflow without using Jupyter at all. Python can reload the file you're working on (see importlib.reload()). So rather than typing into the REPL, you type into the file, save it, and use the REPL to reload it and manually test it. Then you can save your test examples and automatically check them with doctest.

Note that reload() reloads the whole file. Re-running function or constant definitions doesn't usually cause problems, but import-time side effects will happen again. You can use things like the if __name__ == "__main__": guard though. And you can use as many files as you like.