| Server IP : 14.225.204.176 / Your IP : 216.73.217.134 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /snap/core20/current/lib/python3.8/__pycache__/ |
Upload File : |
U
�ʦi�~ �
@ sB d Z ddddddddd d
ddd
g
ZddlZddlZddlZddlZddlZddlmZ ddl Z ddl
Z
ddlZddlZddl
mZ ddlmZ dZejdded�Ze� �ej� ejdd� �Zdd� Zdd� Zdd� Zdd� ZG dd� d�ZG dd
� d
�ZdZ e�!d �Z"dMd"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/d0� d0�Z+G d1d2� d2e+�Z,d3d4� Z-G d5d� de.�Z/d6d7d8d9d:�Z0e1� Z2G d;d<� d<�Z3d=d>� Z4e5e6e7eje8fZ9G d?d@� d@e1�Z:dAdB� Z;e<e=e-e*e,dC�e>e=e;e3e:dC�iZ?ddDe=dE�dFd �Z@ddDe=dE�dGd�ZAe<dDdHdI�dJd
�ZBe<dHdDdK�dLd�ZCdS )Na� 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)�ParserCreatei �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/lib/python3.8/plistlib.py�_maybe_openR s
r c
C s<