
    3jF                        d Z ddlmZ g dZddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ d	 Z ej                         r dd
lmZ  ede      Zej#                          yy)aJ  
IPython/Jupyter extension to music21.  In Jupyter Notebook call:

   %load_ext music21.ipython21

and show will take place inside the browser.

Since at least music21 v5, however, when music21 is imported we set a timer
for two seconds to everything to settle and then load our extension (which
now just calls matplotlib inline)
    )annotations)
convertersipExtensionobjectsload_ipython_extensionloadNoMagic)common)r   )r   )r   )r   c                     t        j                         r3ddlm}  | j	                         r| j                         }t        |       yyy)z
    Load the magic functions of load_ipython_extension when running Jupyter (was IPython)
    without needing to call a %magic function

    Safest is always ot call %load_ext music21.ipython21 anyhow.
    r   )InteractiveShellN)r	   runningInNotebookIPython.core.interactiveshellr   initializedinstancer   )r   localIPs     G/DATA/.local/lib/python3.12/site-packages/music21/ipython21/__init__.pyr   r   &   s?     !B'')&//1G"7+ * "    )Timer   N)__doc__
__future__r   __all__music21r	   music21.ipython21r   r   r   music21.ipython21.ipExtensionr   r   r   	threadingr   tstart r   r   <module>r      sY   
 #  ( ) % @," 6aAGGI r   