From 182d3cdc7f8cd946812c1349d25c26f3fada9d04 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sat, 27 Apr 2024 02:07:15 +0200 Subject: [PATCH] Document registration for spyder. --- README.rst | 4 ++++ src/ipython_autoimport.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index d103d89..6f057f8 100644 --- a/README.rst +++ b/README.rst @@ -67,6 +67,10 @@ Then, append the output of ``python -m ipython_autoimport`` to the locate`` (typically ``~/.ipython/profile_default/``). If you don't have such a file at all, first create it with ``ipython profile create``. +When using Spyder, the above registration method will not work; instead, add +``%load_ext ipython_autoimport`` to the ``Preferences -> IPython console -> +Startup -> Run code`` option. + Note that upon loading, ``ipython_autoimport`` will register its submodule auto-importer to IPython's "limited evalutation" completer policy (on IPython versions that support it). diff --git a/src/ipython_autoimport.py b/src/ipython_autoimport.py index ea41b49..88d2b8b 100644 --- a/src/ipython_autoimport.py +++ b/src/ipython_autoimport.py @@ -289,8 +289,8 @@ def unload_ipython_extension(ipython): if __name__ == "__main__": if os.isatty(sys.stdout.fileno()): print("""\ -# Please append the output of this command to the -# output of `ipython profile locate` (typically +# Please append the output of this command to the config file in +# the directory specified by `ipython profile locate` (typically # `~/.ipython/profile_default/ipython_config.py`) """) print("""\