Your IP : 18.188.62.10
U
e5d�} �
@ s> d Z ddddddddd d
ddd
g
ZddlZddlZddlZddlZddlZddlmZ ddl Z ddl
Z
ddlZddlZddl
mZ ddlmZ ejdded�Ze� �ej� ejdd� �Zdd� Zdd� Zdd� Zdd� ZG dd� d�ZG dd
� d
�ZdZe� d�Z!dLd!d"�Z"d#d$� Z#e� d%ej$�Z%d&d'� Z&d(d)� Z'd*d+� Z(G d,d-� d-�Z)G d.d/� d/�Z*G d0d1� d1e*�Z+d2d3� Z,G d4d� de-�Z.d5d6d7d8d9�Z/e0� Z1G d:d;� d;�Z2d<d=� Z3e4e5e6eje7fZ8G d>d?� d?e0�Z9d@dA� Z:e;e<e,e)e+dB�e=e<e:e2e9dB�iZ>ddCe<dD�dEd �Z?ddCe<dD�dFd�Z@e;dCdGdH�dId
�ZAe;dGdCdJ�dKd�ZBdS )Ma� plistlib.py -- a tool to generate and parse MacOSX .plist files.
The property list (.plist) file format is a simple XML pickle supporting
basic object types, like dictionaries, lists, numbers and strings.
Usually the top level object is a dictionary.
To write out a plist file, use the dump(value, file)
function. 'value' is the top level object, 'file' is
a (writable) file object.
To parse a plist from a file, use the load(file) function,
with a (readable) file object as the only argument. It
returns the top level object (again, usually a dictionary).
To work with plist data in bytes objects, you can use loads()
and dumps().
Values can be strings, integers, floats, booleans, tuples, lists,
dictionaries (but only with string keys), Data, bytes, bytearray, or
datetime.datetime objects.
Generate Plist example:
pl = dict(
aString = "Doodah",
aList = ["A", "B", 12, 32.1, [1, 2, 3]],
aFloat = 0.1,
anInt = 728,
aDict = dict(
anotherString = "<hello & hi there!>",
aUnicodeValue = "M\xe4ssig, Ma\xdf",
aTrueValue = True,
aFalseValue = False,
),
someData = b"<binary gunk>",
someMoreData = b"<lots of binary gunk>" * 10,
aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())),
)
with open(fileName, 'wb') as fp:
dump(pl, fp)
Parse Plist example:
with open(fileName, 'rb') as fp:
pl = load(fp)
print(pl["aKey"])
� readPlist�
writePlist�readPlistFromBytes�writePlistToBytes�Data�InvalidFileException�FMT_XML�
FMT_BINARY�load�dump�loads�dumps�UID� N)�BytesIO)�warn)�ParserCreate�PlistFormatzFMT_XML FMT_BINARY)�modulec c s2 t | t�r(t| |��}|V W 5 Q R X n| V d S �N)�
isinstance�str�open)�
pathOrFile�mode�fp� r � /usr/lib64/python3.8/plistlib.py�_maybe_openO s
r c
C s<