opc.base module#

class opc.base.Base(parent)[source]#

This is a abstract class that initializes and provide parent property

Objects of a class that inherits this class gets parent property See CoreProperties for example

Parameters:

parent – parent object that will be returned through parent property

property parent#

Returns the parent object of current object

class opc.base.PartBase[source]#

This is a abstract class that part and relspart classes inherits

Objects of a class that inherits this class gets package property See Part for example

property package#

property that returns the package object

class opc.base.XmlBase[source]#

This is a base class for objects that has xml content. It is inherited by classes like Types

read(f)[source]#

parse the given file object as xml and assigns the root element to self._e

write(f)[source]#

writes the xml content in self._e to the given file object. utf-8 encoding, xml_declaration and standalone properties are applied to xml

property e#

returns the underlying xml element object

property parser#

returns the parser object

class opc.base.XmlTypeobjBase(part)[source]#

This is a base class for classes like CoreProperties. It inherits class opc.base.XmlBase for xml related data and behavior. It also inherits class opc.base.Base.

Parameters:

partPart object

property part#

property that returns the part object of say CoreProperties typeobj