When using PyWin I can easily load a python file into a fresh interactive shell and I find this quite handy for prototyping and other exploratory tasks.
I would like to use Komodo as my python editor, but I haven’t found a replacement for PyWin’s ability to restart the shell and reload the current module. How can I do this in Komodo?
It is also very important to me that when I reload I get a fresh shell. I would prefer it if my previous interactions are in the shell history, but it is more important to me that the memory be isolated from the previous versions and attempts.
I use Komodo Edit, which might be a little less sophisticated than full Komodo.
I create a ‘New Command’ with
%(python) -i %fas the text of the command. I have this run in a ‘New Console’. I usually have the starting directory as %p, the top of the project directory.The -i option runs the file and drops into interactive Python.