Skip to content

autoreload fails to work #2976

@wting

Description

@wting

with v0.12.1

Python 2.7.3 (default, Aug  1 2012, 05:16:07)
Type "copyright", "credits" or "license" for more information.

IPython 0.12.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: %load_ext autoreload

In [2]: %autoreload 2

In [3]: %aimport foo

In [4]: %aimport
Modules to reload:
all-except-skipped

Modules to skip:


In [5]: foo.bar()
Out[5]: 1

In [6]: foo.bar()
Out[6]: 1

In [7]: reload(foo)
Out[7]: <module 'foo' from 'foo.py'>

In [8]: foo.bar()
Out[8]: 2

In [9]: 

with v1.0-dev:

Python 2.7.3 (default, Aug  1 2012, 05:14:39)
Type "copyright", "credits" or "license" for more information.

IPython 1.0.dev -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: %load_ext autoreload

In [2]: %autoreload 2

In [3]: %aimport foo

In [4]: import foo

In [5]: %aimport
Modules to reload:
all-except-skipped

Modules to skip:


In [6]: foo.bar()
1

In [7]: foo.bar()
1

In [8]: reload(foo)
Out[8]: <module 'foo' from 'foo.py'>

In [9]: foo.bar()
2

In [10]: 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions