Show More
@@ -1584,10 +1584,7 b' Currently the magic system has the following functions:\\n"""' | |||||
1584 | prog_ns = self.shell.user_ns |
|
1584 | prog_ns = self.shell.user_ns | |
1585 | __name__save = self.shell.user_ns['__name__'] |
|
1585 | __name__save = self.shell.user_ns['__name__'] | |
1586 | prog_ns['__name__'] = '__main__' |
|
1586 | prog_ns['__name__'] = '__main__' | |
1587 |
|
||||
1588 | ##main_mod = FakeModule(prog_ns) |
|
|||
1589 | main_mod = self.shell.new_main_mod(prog_ns) |
|
1587 | main_mod = self.shell.new_main_mod(prog_ns) | |
1590 |
|
||||
1591 | else: |
|
1588 | else: | |
1592 | # Run in a fresh, empty namespace |
|
1589 | # Run in a fresh, empty namespace | |
1593 | if opts.has_key('n'): |
|
1590 | if opts.has_key('n'): | |
@@ -1596,11 +1593,9 b' Currently the magic system has the following functions:\\n"""' | |||||
1596 | name = '__main__' |
|
1593 | name = '__main__' | |
1597 |
|
1594 | |||
1598 | main_mod = self.shell.new_main_mod() |
|
1595 | main_mod = self.shell.new_main_mod() | |
1599 |
|
||||
1600 | prog_ns = main_mod.__dict__ |
|
1596 | prog_ns = main_mod.__dict__ | |
1601 | prog_ns['__name__'] = name |
|
1597 | prog_ns['__name__'] = name | |
1602 |
|
1598 | |||
1603 |
|
||||
1604 | # Since '%run foo' emulates 'python foo.py' at the cmd line, we must |
|
1599 | # Since '%run foo' emulates 'python foo.py' at the cmd line, we must | |
1605 | # set the __file__ global in the script's namespace |
|
1600 | # set the __file__ global in the script's namespace | |
1606 | prog_ns['__file__'] = filename |
|
1601 | prog_ns['__file__'] = filename |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
@@ -2,12 +2,15 b'' | |||||
2 |
|
2 | |||
3 | The problem is related to https://bugs.launchpad.net/ipython/+bug/269966 |
|
3 | The problem is related to https://bugs.launchpad.net/ipython/+bug/269966 | |
4 |
|
4 | |||
5 |
The original fix for that appeared to work, but JD Hunter found a |
|
5 | The original fix for that appeared to work, but John D. Hunter found a | |
6 |
example which, when run twice in a row, would break. The problem |
|
6 | matplotlib example which, when run twice in a row, would break. The problem | |
7 | references held by open figures to internals of Tkinter. |
|
7 | were references held by open figures to internals of Tkinter. | |
8 |
|
8 | |||
9 |
This code reproduces the problem that John saw, without matplotlib. |
|
9 | This code reproduces the problem that John saw, without matplotlib. | |
10 | thus use it for our test suite. |
|
10 | ||
|
11 | This script is meant to be called by other parts of the test suite that call it | |||
|
12 | via %run as if it were executed interactively by the user. As of 2009-04-13, | |||
|
13 | test_magic.py calls it. | |||
11 | """ |
|
14 | """ | |
12 |
|
15 | |||
13 | #----------------------------------------------------------------------------- |
|
16 | #----------------------------------------------------------------------------- |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
General Comments 0
You need to be logged in to leave comments.
Login now