← Back
Editing: packaging.cpython-311.pyc
� �@�cL � � � d Z ddlZddlZddlZddlmZ ddlmZmZm Z d� Z d� Zh d�Zh d�Z h d �Zd dhZe G d� d e� � � � ZdS )z5Implementation of packaging-related magic functions. � N)�Path)�Magics�magics_class� line_magicc �\ � t t j dd� � � � � S )z>Return True if the current Python executable is in a conda env� conda-meta�history)r �sys�prefix�exists� � �?/usr/lib/python3/dist-packages/IPython/core/magics/packaging.py�_is_conda_environmentr s$ � � �� �L�)�4�4�;�;�=�=�=r c �f � t t j � � j dz } | � � � rt | � � S t t j dd� � � d�� � }t j d|t j �� � }|r|� � � d S dS ) z%Find the path to the conda executable�condar r zutf-8)�encodingz2^#\s*cmd:\s*(?P<command>.*conda)\s[create|install])�flags�command)r r � executable�parent�is_file�strr � read_text�re�search� MULTILINE� groupdict)r r �matchs r �_get_conda_executabler s� � � ��� � �'�'�1�E��}�}��� ��5�z�z�� �3�:�|�Y�7�7�A�A�7�A�S�S�G��I�=���l� � � �E� � ,���� � ��+�+� �7r > �list�remove�update�install�upgrade� uninstall> r"