Show More
@@ -0,0 +1,6 | |||
|
1 | Adds object inspection to %load magic so that source for objects in user or global namespaces can be loaded. To enable searching the namespace, use the ``-n`` option. | |
|
2 | ||
|
3 | .. sourcecode:: ipython | |
|
4 | ||
|
5 | In [1]: %load -n my_module.some_function | |
|
6 |
@@ -57,6 +57,17 for playing with examples from documentation, such as matplotlib. | |||
|
57 | 57 | ...: |
|
58 | 58 | ...: plt.show() |
|
59 | 59 | |
|
60 | The ``%load`` magic can also load source code from objects in the user or | |
|
61 | global namespace by invoking the ``-n`` option. | |
|
62 | ||
|
63 | .. sourcecode:: ipython | |
|
64 | ||
|
65 | In [1]: import hello_world | |
|
66 | ...: %load -n hello_world.say_hello | |
|
67 | ||
|
68 | In [3]: def say_hello() : | |
|
69 | ...: print("Hello World!") | |
|
70 | ||
|
60 | 71 | Inline Matplotlib |
|
61 | 72 | ================= |
|
62 | 73 |
General Comments 0
You need to be logged in to leave comments.
Login now