wL iUzdZddlZddlZddlmZd dZd dZd dZdZ d d Z dd Z ejd k(Z y)zCompatibility tricks for Python 3. Mainly to do with unicode. This file is deprecated and will be removed in a future version. N)DEFAULT_ENCODINGc:|xst}|j|dSNreplace)rdecodesencodings ]/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/IPython/utils/py3compat.pyrr ++H 88Hi ((c:|xst}|j|dSr)rencode)ur s r rrr rc>t|tr t||S|SN) isinstancebytesrr s r cast_unicoders!Ua"" Hrcn t|S#t$rYnwxYw t|S#t$rYywxYw)zlunicode(e) with various fallbacks. Used for exceptions, which may not be safe to call unicode() on. zUnrecoverably corrupt evalue)str UnicodeErrorrepr)es r safe_unicodersE 1v     Aw   ) s  ( 44c,tj|Sr) builtin_modinput)prompts r rr0s   V $$rc||n|}t|d5}|xst}t||j|d||dddy#1swYyxYw)Nrbexec)opencompiler#read)fnameglobloccompilerfs r execfiler,4sS/#C eT ;a&w Xaffhv .c:;;;s .A  APyPyr))NN)__doc__platformbuiltinsrr rrrrrrr,python_implementationPYPYrr r5sJ &) )  *&%;&x%%'61r