[IPython-user] autoreload 1 and aimport don't seem to work

khosra amirnntp@gmail....
Sat Aug 30 15:53:57 CDT 2008

I am using 0.9.rc1 and have 'import ipy_autoreload' in ipy_user_conf.py. I
can get aimport to work only with modules in the current directory. I am
probably not understanding the documentation. What am I doing incorrectly?
First time I tried this feature.

I have the following setup:

$ ls reload_test 
__init__.py  reload_me.py

where __init__.py is blank and reload_me.py is one line:

change = 1

Then this is my ipython transcript:

In [1]: pwd
Out[1]: '/home/amir/python'

In [2]: autoreload 1

In [3]: aimport reload_test.reload_me

In [4]: aimport
Modules to reload:

Modules to skip:

In [5]: reload_test.reload_me   # didn't seem to load

NameError                                 Traceback (most recent call last)

/home/amir/python/<ipython console> in <module>()

NameError: name 'reload_test' is not defined

In[6]: cd reload_test

In[7]: aimport reload_me

In[8]: aimport 
Modules to reload:
reload_me reload_test.reload_me

Modules to skip:

In[9]: reload_me.change
Out[9]: 1

In[10]: # edit reload_me.change and set 'change = 2'

In[11]: reload_me.change    # works fine
Out[11]: 2

View this message in context: http://www.nabble.com/autoreload-1-and-aimport-don%27t-seem-to-work-tp19237054p19237054.html
Sent from the IPython - User mailing list archive at Nabble.com.

More information about the IPython-user mailing list