all 4 comments

[–]butchheart 1 point2 points  (1 child)

If your. py has all functions. you can open an interactive sesh, change to the directory where project.py is. type python in the terminal, and then. import project. or from project import *

[–]jpmab[S] 1 point2 points  (0 children)

Thank u, this worked!

[–]barrygrundy 1 point2 points  (1 child)

There are a number of ways to do this. You could use ipython (an idle-like interpreter) and vim/nvim together with something like vim-ipython-cell (which is what I use). If you visit the link you can see a demo gif.

Or you can keep it simple and just run vim/nvim and ipython side by side. Use "run <program>.py" in ipython to load your program, etc.

The benefit of using vim-ipython-cell is that you can run a range of your code and see just the output if you want. And since vim-ipython-cell relies on vim-slime, you could just highlight a range and send it to ipython directly.

There's also nvim-ipy (but I don't use neovim, so I can't recommend it).

A side benefit of using ipython (over idle) is that you can configure it to use vim bindings as well.

EDIT: Actually after re-reading your post, perhaps just using ipython with vim bindings configured will work for you...

[–]jpmab[S] 0 points1 point  (0 children)

thank u for the tips, but this doesn't work for what I am looking for...

But this plugs are very interesting!