File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ can switch back to Julia REPl by `backspace` or `ctrl-h` key (like
1616other REPL modes). For older versions of IPython, exiting IPython as
1717usual (e.g., ` ctrl-d ` ) brings you back to the Julia REPL. Re-entering
1818IPython keeps the previous state. Use pre-defined ` Main ` object to
19- access Julia namespace from IPython.
19+ access Julia namespace from IPython. Use ` py"..." ` string macro to
20+ access Python namespace from Julia.
2021
2122** Note:**
2223First launch of IPython may be slow.
Original file line number Diff line number Diff line change @@ -24,8 +24,12 @@ def post_startup_configuration(ip):
2424
2525def ipython_options (** kwargs ):
2626 from traitlets .config import Config
27+ import __main__
2728
28- user_ns = dict (
29+ # Use `__main__.__dict__` so that IPython namespace can be
30+ # retrieved from PyCall using `py"object"`.
31+ user_ns = __main__ .__dict__
32+ user_ns .update (
2933 Main = get_main (** kwargs ),
3034 )
3135
You can’t perform that action at this time.
0 commit comments