관리-도구
편집 파일: dicttoxml.cpython-38.pyc
U *�e�: � @ sj d Z ddlmZ dZeZddlmZ zddlmZ W n e k rT ddlmZ Y nX ddlZddl Z ddlmZ e �d�Zze W n eZY nX ze W n eZY nX d3dd�Zd d� Zg Zd4dd�Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Z d!d"� Z!d5d$d%�Z"d&d'� Z#d(d)� Z$d6d*d+�Z%d7d,d-�Z&d8d.d/�Z'd0d#d0d d0e!d d0d1d0f d2d�Z(dS )9a Converts a Python dictionary or other native data type into a valid XML string. Supports item (`int`, `float`, `long`, `decimal.Decimal`, `bool`, `str`, `unicode`, `datetime`, `none` and other number-like objects) and collection (`list`, `set`, `tuple` and `dict`, as well as iterable and dict-like objects) data types, with arbitrary nesting for the collections. Items with a `datetime` type are converted to ISO format strings. Items with a `None` type become empty XML elements. This module works with both Python 2 and 3. � )�unicode_literalsz1.7.16)�randint)�IterableN)�parseString� dicttoxmlF� dicttoxml.logc C sT | rBdd l }td| � tj|tjd� t�dt|j �� � � ntjtj d� d S )Nr z*Debug mode is on. Events are logged at: %s)�filename�levelz Logging session starts: %s)r ) �datetime�print�logging�basicConfig�INFO�LOG�info�str�today�WARNING)�debugr r � r �7/opt/hc_python/lib/python3.8/site-packages/dicttoxml.py� set_debug, s �r c C s6 t �d| f � zt| d�W S t| � Y S X dS )z�Converts strings with non-ASCII characters to unicode for LOG. Python 3 doesn't have a `unicode()` function, so `unicode()` is an alias for `str()`, but `str()` doesn't take a second argument, hence this kludge. zInside unicode_me(). val = "%s"�utf-8N)r r �unicode��valr r r � unicode_me8 s r 順 �?B c C s&