Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
plistlib.Data Class Reference

List of all members.

Public Member Functions

def __init__
def fromBase64
def asBase64
def __eq__
def __repr__

Public Attributes

 data

Detailed Description

Wrapper for binary data.

Definition at line 330 of file plistlib.py.


Constructor & Destructor Documentation

def plistlib.Data.__init__ (   self,
  data 
)

Definition at line 334 of file plistlib.py.

00334 
00335     def __init__(self, data):
00336         if not isinstance(data, bytes):
00337             raise TypeError("data must be as bytes")
00338         self.data = data

Here is the caller graph for this function:


Member Function Documentation

def plistlib.Data.__eq__ (   self,
  other 
)

Definition at line 348 of file plistlib.py.

00348 
00349     def __eq__(self, other):
00350         if isinstance(other, self.__class__):
00351             return self.data == other.data
00352         elif isinstance(other, str):
00353             return self.data == other
00354         else:
00355             return id(self) == id(other)

def plistlib.Data.__repr__ (   self)

Definition at line 356 of file plistlib.py.

00356 
00357     def __repr__(self):
00358         return "%s(%s)" % (self.__class__.__name__, repr(self.data))

def plistlib.Data.asBase64 (   self,
  maxlinelength = 76 
)

Definition at line 345 of file plistlib.py.

00345 
00346     def asBase64(self, maxlinelength=76):
00347         return _encodeBase64(self.data, maxlinelength)

Here is the call graph for this function:

def plistlib.Data.fromBase64 (   cls,
  data 
)

Definition at line 340 of file plistlib.py.

00340 
00341     def fromBase64(cls, data):
00342         # base64.decodebytes just calls binascii.a2b_base64;
00343         # it seems overkill to use both base64 and binascii.
00344         return cls(binascii.a2b_base64(data))


Member Data Documentation

Definition at line 337 of file plistlib.py.


The documentation for this class was generated from the following file: