Format: application/x-python-code
⬇ Download File (1.7 KB)
   1  o
   2  
   3  ��hB�@s|dZddlZddlZddlmZddd�Zddd�Zdd	d
   4  �Zdd�Z	ddd�Z
   5  ddd�Ze��dkZ
   6  ddd�ZeZZdS)z�Compatibility tricks for Python 3. Mainly to do with unicode.
   7  
   8  This file is deprecated and will be removed in a future version.
   9  �N�)�DEFAULT_ENCODINGcC�|pt}|�|d�S�N�replace)r�decode��s�encoding�r�Mc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/utils/py3compat.pyr�rcCrr)r�encode)�ur
  10  rrrrr
  11  rcCst|t�r
  12  t||�S|S�N)�
  13  isinstance�bytesrrrrr�cast_unicodes
  14  
  15  rcCs>zt|�WStyYnwzt|�WStyYdSw)zlunicode(e) with various fallbacks. Used for exceptions, which may not be
  16      safe to call unicode() on.
  17      zUnrecoverably corrupt evalue)�str�UnicodeError�repr)�errr�safe_unicodes
  18  �
  19  �r�cCs
  20  t�|�Sr)�builtin_mod�input)�promptrrrr/s
  21  rcCs`|dur|n|}t|d��}|pt}t||��|d�||�Wd�dS1s)wYdS)N�rb�exec)�open�compiler�read)�fname�glob�loc�compiler�frrr�execfile3s
  22  "�r'�PyPycCs|Srr)�xr
  23  rrr�no_code@sr*r)r)NN)�__doc__�platform�builtinsrr
  24  rrrrrrr'�python_implementationZPYPYr*Zunicode_to_strZcast_bytes_py2rrrr�<module>s
  25  
  26  
  27  
  28  
  29  
  30