fgallina / python.el

Python's flying circus support for Emacs
GNU General Public License v3.0
267 stars 53 forks source link

not reloading python modules on python-shell-send-buffer #130

Closed pashinin closed 11 years ago

pashinin commented 11 years ago

When I use python-shell-send-buffer (C-c C-c) I can see changes from my main buffer in python shell.

But if my buffer has imported modules they are not reloaded. Can it be fixed?

For exmple:
main.py:

from functions import foo
print 'a'
foo()

functions.py:

def foo():
    print 'bcdef'

So if I change foo() and run python-shell-send-buffer on main.py - it gives me the same foo() it read 1st time

a
bcdef   # never changed
fgallina commented 11 years ago

This is not a limitation of the python shell itself. Try using ipython and its built-in reload method for your modules.