File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,9 @@ The `juliacall` IPython extension adds these features to your IPython session:
67
67
68
68
The extension is experimental and unstable - the API can change at any time.
69
69
70
- Enable the extension with ` %load_ext juliacall ` .
71
- See [ the IPython docs] ( https://ipython.readthedocs.io/en/stable/config/extensions/ ) .
70
+ You can explicitly enable the extension with ` %load_ext juliacall ` , but
71
+ it will automatically be loaded if ` juliacall ` is imported and IPython is detected.
72
+ You can disable this behavior with an [ environment variable] (@ref julia-config).
72
73
73
74
The ` %%julia ` cell magic can synchronise variables between Julia and Python by listing them
74
75
on the first line:
@@ -88,6 +89,9 @@ In [5]: z
88
89
Out[5 ]: ' 2^8 = 256'
89
90
```
90
91
92
+ Also see [ the IPython docs] ( https://ipython.readthedocs.io/en/stable/config/extensions/ )
93
+ for more information on extensions.
94
+
91
95
## Asynchronous Julia code (including Makie)
92
96
93
97
Asynchronous Julia code will not normally run while Python is executing, unless it is in a
Original file line number Diff line number Diff line change @@ -123,3 +123,4 @@ be configured in two ways:
123
123
| ` -X juliacall-sysimage=<file> ` | ` PYTHON_JULIACALL_SYSIMAGE=<file> ` | Use the given system image. |
124
124
| ` -X juliacall-threads=<N\|auto> ` | ` PYTHON_JULIACALL_THREADS=<N\|auto> ` | Launch N threads. |
125
125
| ` -X juliacall-warn-overwrite=<yes\|no> ` | ` PYTHON_JULIACALL_WARN_OVERWRITE=<yes\|no> ` | Enable or disable method overwrite warnings. |
126
+ | ` -X juliacall-autoload-ipython-extension=<yes\|no> ` | ` PYTHON_JULIACALL_AUTOLOAD_IPYTHON_EXTENSION=<yes\|no> ` | Enable or disable IPython extension autoloading. |
Original file line number Diff line number Diff line change @@ -257,11 +257,7 @@ def jlstr(x):
257
257
if CONFIG ['autoload_ipython_extension' ] is None :
258
258
# Only let the user know if it was not explicitly set
259
259
print (
260
- "Detected IPython. Loading juliacall extension. To disable, you can either "
261
- "set the environment variable PYTHON_JULIACALL_AUTOLOAD_IPYTHON_EXTENSION=no or pass the "
262
- "command line argument '-X juliacall-autoload-ipython-extension=no'. Inside Jupyter, you can "
263
- "do this with `import os; os.environ['PYTHON_JULIACALL_AUTOLOAD_IPYTHON_EXTENSION'] = 'no'`. "
264
- "To suppress this message, set PYTHON_JULIACALL_AUTOLOAD_IPYTHON_EXTENSION=yes."
260
+ "Detected IPython. Loading juliacall extension. See https://juliapy.github.io/PythonCall.jl/stable/compat/#IPython"
265
261
)
266
262
267
263
load_ipython_extension (get_ipython ())
You can’t perform that action at this time.
0 commit comments