These are chat archives for evhub/coconut

12th
Jan 2018
Alex Coventry
@coventry
Jan 12 2018 02:08
Any way to reload a coconut module from the REPL?
Alex Coventry
@coventry
Jan 12 2018 02:46
Is there a way to run coconut code under spyder?
Evan Hubinger
@evhub
Jan 12 2018 08:56

@coventry Yes and yes!

For reloading modules from the REPL, you'll need the latest development version, which you can get with pip install -U coconut-develop. Then, open the REPL in the right directory with coconut, run import module, do whatever you want, then to reload just call reload(module) on the module you imported.

For using Coconut with Spyder, it should be using an IPython console by default, so just %load_ext coconut to load in Coconut. Once that's done, you should be able to just import the file as above, and you should be able to run Coconut code with %coconut or %%coconut.
Alex Coventry
@coventry
Jan 12 2018 18:10
Thanks, @evhub
Alex Coventry
@coventry
Jan 12 2018 22:08
I'm getting a RecursionError when I attempt a reload.