File: //usr/local/lib/python3.9/site-packages/celery/bin/__pycache__/shell.cpython-39.pyc
a
X>h� � @ s, d Z ddlZddlZddlmZ ddlZddlmZmZm Z dd� Z
dd� Zd d
� Zdd� Z
d
d� Zdd� Zdd� Zdd� Zdd� Zejeddid�ejdddeddd�ejdd dedd!d�ejd"dedd#d�ejd$d%dedd&d�ejd'dedd(d�ejd)dedd*d�eje d.d,d-����������ZdS )/z3The ``celery shell`` program, used to start a REPL.� N)�
import_module)�
CeleryCommand�CeleryOption�handle_preload_optionsc C s\ dd l }zdd l}W n ty& Y n&0 dd l}|�|�| �j� |�d� |j| d� d S )Nr ztab:complete)�local) �code�readline�ImportError�rlcompleterZ
set_completerZ CompleterZcomplete�parse_and_bindZinteract)�localsr r r
� r
�:/usr/local/lib/python3.9/site-packages/celery/bin/shell.py�_invoke_fallback_shell s
�
r c C s dd l }|�| � d S �Nr )�bpython�embed)r r r
r
r �_invoke_bpython_shell s r c C s: t ttttfD ]&}z|| �W S ty2 Y q0 qd S )N)�_ipython�_ipython_pre_10�_ipython_terminal�_ipython_010�_no_ipythonr )r �ipr
r
r �_invoke_ipython_shell s �r c C s ddl m} |g | d� d S )Nr )�
start_ipython��argv�user_ns)�IPythonr )r r r
r
r r ) s r c C s: ddl m} |�� }|jg d� |jj�| � |�� d S )Nr )�TerminalIPythonApp)r )ZIPython.frontend.terminal.ipappr �instanceZ
initialize�shellr �update�start)r r �appr
r
r r . s
r c C s ddl m} |j| d��� d S )Nr )r )r )ZIPython.terminalr ZTerminalInteractiveShell�mainloop)r r r
r
r r 6 s r c C s ddl m} |g | d��� d S )Nr )�IPShellr )Z
IPython.Shellr'