| Server IP : 35.80.110.71 / Your IP : 216.73.216.52 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/IPython/utils/__pycache__/ |
Upload File : |
�
}�e
� � � d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZmZ de
dee
e
f fd�Zde
defd �Zdefd
�Zd� Zd� Zy)
zQ
Utilities for getting information about IPython and the system it's running in.
� N)�Path)�release)�_sysinfo�encoding�pkg_path�returnc �< � t j rdt j fS t j dj d� t j
t j
| �� }|j
� \ }}|r!d|j � j d� fS y)a" Get short form of commit hash given directory `pkg_path`
We get the commit hash from (in order of preference):
* IPython.utils._sysinfo.commit
* git output, if we are in a git repository
If these fail, we return a not-found placeholder tuple
Parameters
----------
pkg_path : str
directory containing package
only used for getting commit from active repo
Returns
-------
hash_from : str
Where we got the hash from - description
hash_str : str
short form of hash
�installationzgit rev-parse --short HEAD� )�stdout�stderr�cwd�
repository�ascii)z(none found)z<not found>) r �commit�
subprocess�Popen�split�PIPE�communicate�strip�decode)r �proc�repo_commit�_s �7/usr/lib/python3/dist-packages/IPython/utils/sysinfo.py�pkg_commit_hashr s� � �0 ����x���.�.� ���8�>�>�s�C�#-�?�?�#-�?�?� (�*�D� �%�%�'�N�K����[�.�.�0�7�7��@�@�@�(� c � � t | � \ }}t t j | ||t j t j
t j t
j � t j t j ��
S )z�Return dict describing the context of this package
Parameters
----------
pkg_path : str
path containing __init__.py for package
Returns
-------
context : dict
with named parameters of interest
)
�ipython_version�ipython_path�
commit_source�commit_hash�sys_version�sys_executable�sys_platform�platform�os_name�default_encoding)r �dictr �version�sys�
executabler'