File: //home/arjun/projects/env/lib/python3.10/site-packages/celery/bin/__pycache__/shell.cpython-310.pyc
o
-we� �
@ s2 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 nw dd l}|�|�| �j� |�d� |j| d� d S )Nr ztab:complete)�local) �code�readline�ImportError�rlcompleter�
set_completer� Completer�complete�parse_and_bind�interact)�localsr r r
� r �I/home/arjun/projects/env/lib/python3.10/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 s8 t ttttfD ]}z|| �W S ty Y qw d 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! )�IPython.frontend.terminal.ipappr$ �instance�
initialize�shellr"