ezdxf API Reference
Full documentation for ezdxf (1.4.4)
ezdxf.ARROWS
Python Library Documentation: _Arrows in module ezdxf.render.arrows object
class _Arrows(builtins.object)
| Methods defined here:
|
| __contains__(self, item: 'str') -> 'bool'
| Returns `True` if `item` is an arrow managed by this class.
|
| arrow_handle(self, blocks: 'BlocksSection', name: 'str') -> 'str'
| Returns the BLOCK_RECORD handle for arrow `name`.
|
| arrow_name(self, block_name: 'str') -> 'str'
| Returns the arrow name.
|
| arrow_shape(self, name: 'str', insert: 'UVec', size: 'float', rotation: 'float') -> 'BaseArrow'
| Returns an instance of the shape management class for arrow `name`.
|
| block_name(self, name: 'str') -> 'str'
| Returns the block name.
|
| create_block(self, blocks: 'BlocksSection', name: 'str') -> 'str'
| Creates the BLOCK definition for arrow `name`.
|
| has_extension_line(self, name)
| Returns ``True`` if the arrow `name` supports extension lines.
|
| insert_arrow(self, layout: 'GenericLayoutType', name: 'str', insert: 'UVec' = Vec3(0.0, 0.0, 0.0), size: 'float' = 1.0, rotation: 'float' = 0, *, dxfattribs=None) -> 'Vec2'
| Insert arrow as block reference into `layout`.
|
| is_acad_arrow(self, item: 'str') -> 'bool'
| Returns ``True`` if `item` is a standard AutoCAD arrow.
|
| is_ezdxf_arrow(self, item: 'str') -> 'bool'
| Returns ``True`` if `item` is a special `ezdxf` arrow.
|
| render_arrow(self, layout: 'GenericLayoutType', name: 'str', insert: 'UVec' = Vec3(0.0, 0.0, 0.0), size: 'float' = 1.0, rotation: 'float' = 0, *, dxfattribs=None) -> 'Vec2'
| Render arrow as basic DXF entities into `layout`.
|
| virtual_entities(self, name: 'str', insert: 'UVec' = Vec3(0.0, 0.0, 0.0), size: 'float' = 0.625, rotation: 'float' = 0, *, dxfattribs=None) -> 'Iterator[DXFGraphic]'
| Returns all arrow components as virtual DXF entities.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CLASSES = {'': <class 'ezdxf.render.arrows.ClosedArrowFilled'>, 'ARCHT...
|
| EXTENSIONS_ALLOWED = {'ARCHTICK', 'DOTSMALL', 'INTEGRAL', 'NONE', 'OBL...
|
| ORIGIN_ZERO = {'ARCHTICK', 'DOTSMALL', 'INTEGRAL', 'NONE', 'OBLIQUE', ...
|
| __acad__ = {'', 'ARCHTICK', 'BOXBLANK', 'BOXFILLED', 'CLOSED', 'CLOSED...
|
| __all_arrows__ = {'', 'ARCHTICK', 'BOXBLANK', 'BOXFILLED', 'CLOSED', '...
|
| __ezdxf__ = {'EZ_ARROW', 'EZ_ARROW_BLANK', 'EZ_ARROW_FILLED'}
|
| architectural_tick = 'ARCHTICK'
|
| box = 'BOXBLANK'
|
| box_filled = 'BOXFILLED'
|
| closed = 'CLOSED'
|
| closed_blank = 'CLOSEDBLANK'
|
| closed_filled = ''
|
| datum_triangle = 'DATUMBLANK'
|
| datum_triangle_filled = 'DATUMFILLED'
|
| dot = 'DOT'
|
| dot_blank = 'DOTBLANK'
|
| dot_small = 'DOTSMALL'
|
| dot_smallblank = 'SMALL'
|
| ez_arrow = 'EZ_ARROW'
|
| ez_arrow_blank = 'EZ_ARROW_BLANK'
|
| ez_arrow_filled = 'EZ_ARROW_FILLED'
|
| integral = 'INTEGRAL'
|
| none = 'NONE'
|
| oblique = 'OBLIQUE'
|
| open = 'OPEN'
|
| open_30 = 'OPEN30'
|
| origin_indicator = 'ORIGIN'
|
| origin_indicator_2 = 'ORIGIN2'
|
| right_angle = 'OPEN90'
ezdxf.DXF12
Error rendering doc: No Python documentation found for 'AC1009'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.DXF2000
Error rendering doc: No Python documentation found for 'AC1015'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.DXF2004
Error rendering doc: No Python documentation found for 'AC1018'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.DXF2007
Error rendering doc: No Python documentation found for 'AC1021'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.DXF2010
Error rendering doc: No Python documentation found for 'AC1024'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.DXF2013
Error rendering doc: No Python documentation found for 'AC1027'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.DXF2018
Error rendering doc: No Python documentation found for 'AC1032'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.DXFAppDataError
Python Library Documentation: class DXFAppDataError in module ezdxf.lldxf.const class DXFAppDataError(DXFStructureError) | Method resolution order: | DXFAppDataError | DXFStructureError | DXFError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFAttributeError
Python Library Documentation: class DXFAttributeError in module ezdxf.lldxf.const class DXFAttributeError(DXFError, builtins.AttributeError) | Method resolution order: | DXFAttributeError | DXFError | builtins.AttributeError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.AttributeError: | | __getstate__(...) | Helper for pickle. | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.AttributeError: | | name | attribute name | | obj | object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFBlockInUseError
Python Library Documentation: class DXFBlockInUseError in module ezdxf.lldxf.const class DXFBlockInUseError(DXFValueError) | Method resolution order: | DXFBlockInUseError | DXFValueError | DXFError | builtins.ValueError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.ValueError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.ValueError: | | __new__(*args, **kwargs) class method of builtins.ValueError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFError
Python Library Documentation: class DXFError in module ezdxf.lldxf.const class DXFError(builtins.Exception) | Base exception for all `ezdxf` exceptions. | | Method resolution order: | DXFError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFIndexError
Python Library Documentation: class DXFIndexError in module ezdxf.lldxf.const class DXFIndexError(DXFError, builtins.IndexError) | Method resolution order: | DXFIndexError | DXFError | builtins.IndexError | builtins.LookupError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.IndexError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.IndexError: | | __new__(*args, **kwargs) class method of builtins.IndexError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFKeyError
Python Library Documentation: class DXFKeyError in module ezdxf.lldxf.const class DXFKeyError(DXFError, builtins.KeyError) | Method resolution order: | DXFKeyError | DXFError | builtins.KeyError | builtins.LookupError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.KeyError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Static methods inherited from builtins.LookupError: | | __new__(*args, **kwargs) class method of builtins.LookupError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFStructureError
Python Library Documentation: class DXFStructureError in module ezdxf.lldxf.const class DXFStructureError(DXFError) | Method resolution order: | DXFStructureError | DXFError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFTableEntryError
Python Library Documentation: class DXFTableEntryError in module ezdxf.lldxf.const class DXFTableEntryError(DXFValueError) | Method resolution order: | DXFTableEntryError | DXFValueError | DXFError | builtins.ValueError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.ValueError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.ValueError: | | __new__(*args, **kwargs) class method of builtins.ValueError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFTypeError
Python Library Documentation: class DXFTypeError in module ezdxf.lldxf.const class DXFTypeError(DXFError, builtins.TypeError) | Method resolution order: | DXFTypeError | DXFError | builtins.TypeError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.TypeError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.TypeError: | | __new__(*args, **kwargs) class method of builtins.TypeError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFValueError
Python Library Documentation: class DXFValueError in module ezdxf.lldxf.const class DXFValueError(DXFError, builtins.ValueError) | Method resolution order: | DXFValueError | DXFError | builtins.ValueError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.ValueError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.ValueError: | | __new__(*args, **kwargs) class method of builtins.ValueError | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFVersionError
Python Library Documentation: class DXFVersionError in module ezdxf.lldxf.const class DXFVersionError(DXFError) | Errors related to features not supported by the chosen DXF Version | | Method resolution order: | DXFVersionError | DXFError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.DXFXDataError
Python Library Documentation: class DXFXDataError in module ezdxf.lldxf.const class DXFXDataError(DXFStructureError) | Method resolution order: | DXFXDataError | DXFStructureError | DXFError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.EZDXF_TEST_FILES
Python Library Documentation: built-in module builtins
NAME
builtins - Built-in functions, types, exceptions, and other objects.
DESCRIPTION
This module provides direct access to all 'built-in'
identifiers of Python; for example, builtins.len is
the full name for the built-in function len().
This module is not normally accessed explicitly by most
applications, but can be useful in modules that provide
objects with the same name as a built-in value, but in
which the built-in of that name is also needed.
CLASSES
object
BaseException
BaseExceptionGroup
ExceptionGroup(BaseExceptionGroup, Exception)
Exception
ArithmeticError
FloatingPointError
OverflowError
ZeroDivisionError
AssertionError
AttributeError
BufferError
EOFError
ImportError
ModuleNotFoundError
LookupError
IndexError
KeyError
MemoryError
NameError
UnboundLocalError
OSError
BlockingIOError
ChildProcessError
ConnectionError
BrokenPipeError
ConnectionAbortedError
ConnectionRefusedError
ConnectionResetError
FileExistsError
FileNotFoundError
InterruptedError
IsADirectoryError
NotADirectoryError
PermissionError
ProcessLookupError
TimeoutError
ReferenceError
RuntimeError
NotImplementedError
RecursionError
StopAsyncIteration
StopIteration
SyntaxError
IndentationError
TabError
SystemError
TypeError
ValueError
UnicodeError
UnicodeDecodeError
UnicodeEncodeError
UnicodeTranslateError
Warning
BytesWarning
DeprecationWarning
EncodingWarning
FutureWarning
ImportWarning
PendingDeprecationWarning
ResourceWarning
RuntimeWarning
SyntaxWarning
UnicodeWarning
UserWarning
GeneratorExit
KeyboardInterrupt
SystemExit
bytearray
bytes
classmethod
complex
dict
enumerate
filter
float
frozenset
int
bool
list
map
memoryview
property
range
reversed
set
slice
staticmethod
str
super
tuple
type
zip
class ArithmeticError(Exception)
| Base class for arithmetic errors.
|
| Method resolution order:
| ArithmeticError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| FloatingPointError
| OverflowError
| ZeroDivisionError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class AssertionError(Exception)
| Assertion failed.
|
| Method resolution order:
| AssertionError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class AttributeError(Exception)
| Attribute not found.
|
| Method resolution order:
| AttributeError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __getstate__(...)
| Helper for pickle.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| name
| attribute name
|
| obj
| object
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BaseException(object)
| Common base class for all exceptions
|
| Built-in subclasses:
| BaseExceptionGroup
| Exception
| GeneratorExit
| KeyboardInterrupt
| ... and 1 other subclasses
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BaseExceptionGroup(BaseException)
| A combination of multiple unrelated exceptions.
|
| Method resolution order:
| BaseExceptionGroup
| BaseException
| object
|
| Built-in subclasses:
| ExceptionGroup
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| derive(...)
|
| split(...)
|
| subgroup(...)
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| exceptions
| nested exceptions
|
| message
| exception message
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BlockingIOError(OSError)
| I/O operation would block.
|
| Method resolution order:
| BlockingIOError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BrokenPipeError(ConnectionError)
| Broken pipe.
|
| Method resolution order:
| BrokenPipeError
| ConnectionError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BufferError(Exception)
| Buffer error.
|
| Method resolution order:
| BufferError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class BytesWarning(Warning)
| Base class for warnings about bytes and buffer related problems, mostly
| related to conversion from str or comparing to str.
|
| Method resolution order:
| BytesWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ChildProcessError(OSError)
| Child process error.
|
| Method resolution order:
| ChildProcessError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ConnectionAbortedError(ConnectionError)
| Connection aborted.
|
| Method resolution order:
| ConnectionAbortedError
| ConnectionError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ConnectionError(OSError)
| Connection error.
|
| Method resolution order:
| ConnectionError
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BrokenPipeError
| ConnectionAbortedError
| ConnectionRefusedError
| ConnectionResetError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ConnectionRefusedError(ConnectionError)
| Connection refused.
|
| Method resolution order:
| ConnectionRefusedError
| ConnectionError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ConnectionResetError(ConnectionError)
| Connection reset.
|
| Method resolution order:
| ConnectionResetError
| ConnectionError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DeprecationWarning(Warning)
| Base class for warnings about deprecated features.
|
| Method resolution order:
| DeprecationWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class EOFError(Exception)
| Read beyond end of file.
|
| Method resolution order:
| EOFError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class EncodingWarning(Warning)
| Base class for warnings about encodings.
|
| Method resolution order:
| EncodingWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
EnvironmentError = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class Exception(BaseException)
| Common base class for all non-exit exceptions.
|
| Method resolution order:
| Exception
| BaseException
| object
|
| Built-in subclasses:
| ArithmeticError
| AssertionError
| AttributeError
| BufferError
| ... and 16 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ExceptionGroup(BaseExceptionGroup, Exception)
| Method resolution order:
| ExceptionGroup
| BaseExceptionGroup
| Exception
| BaseException
| object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from BaseExceptionGroup:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| derive(...)
|
| split(...)
|
| subgroup(...)
|
| ----------------------------------------------------------------------
| Class methods inherited from BaseExceptionGroup:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods inherited from BaseExceptionGroup:
|
| __new__(*args, **kwargs) class method of BaseExceptionGroup
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseExceptionGroup:
|
| exceptions
| nested exceptions
|
| message
| exception message
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class FileExistsError(OSError)
| File already exists.
|
| Method resolution order:
| FileExistsError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class FileNotFoundError(OSError)
| File not found.
|
| Method resolution order:
| FileNotFoundError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class FloatingPointError(ArithmeticError)
| Floating-point operation failed.
|
| Method resolution order:
| FloatingPointError
| ArithmeticError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class FutureWarning(Warning)
| Base class for warnings about constructs that will change semantically
| in the future.
|
| Method resolution order:
| FutureWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class GeneratorExit(BaseException)
| Request that a generator exit.
|
| Method resolution order:
| GeneratorExit
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
IOError = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ImportError(Exception)
| Import can't find module, or can't find name in module.
|
| Method resolution order:
| ImportError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| ModuleNotFoundError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| msg
| exception message
|
| name
| module name
|
| name_from
| name imported from module
|
| path
| module path
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ImportWarning(Warning)
| Base class for warnings about probable mistakes in module imports
|
| Method resolution order:
| ImportWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class IndentationError(SyntaxError)
| Improper indentation.
|
| Method resolution order:
| IndentationError
| SyntaxError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| TabError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from SyntaxError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from SyntaxError:
|
| end_lineno
| exception end lineno
|
| end_offset
| exception end offset
|
| filename
| exception filename
|
| lineno
| exception lineno
|
| msg
| exception msg
|
| offset
| exception offset
|
| print_file_and_line
| exception print_file_and_line
|
| text
| exception text
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class IndexError(LookupError)
| Sequence index out of range.
|
| Method resolution order:
| IndexError
| LookupError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class InterruptedError(OSError)
| Interrupted by signal.
|
| Method resolution order:
| InterruptedError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class IsADirectoryError(OSError)
| Operation doesn't work on directories.
|
| Method resolution order:
| IsADirectoryError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class KeyError(LookupError)
| Mapping key not found.
|
| Method resolution order:
| KeyError
| LookupError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from LookupError:
|
| __new__(*args, **kwargs) class method of LookupError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class KeyboardInterrupt(BaseException)
| Program interrupted by user.
|
| Method resolution order:
| KeyboardInterrupt
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class LookupError(Exception)
| Base class for lookup errors.
|
| Method resolution order:
| LookupError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| IndexError
| KeyError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class MemoryError(Exception)
| Out of memory.
|
| Method resolution order:
| MemoryError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ModuleNotFoundError(ImportError)
| Module not found.
|
| Method resolution order:
| ModuleNotFoundError
| ImportError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from ImportError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from ImportError:
|
| msg
| exception message
|
| name
| module name
|
| name_from
| name imported from module
|
| path
| module path
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class NameError(Exception)
| Name not found globally.
|
| Method resolution order:
| NameError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| UnboundLocalError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| name
| name
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class NotADirectoryError(OSError)
| Operation only works on directories.
|
| Method resolution order:
| NotADirectoryError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class NotImplementedError(RuntimeError)
| Method or function hasn't been implemented yet.
|
| Method resolution order:
| NotImplementedError
| RuntimeError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class OverflowError(ArithmeticError)
| Result too large to be represented.
|
| Method resolution order:
| OverflowError
| ArithmeticError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class PendingDeprecationWarning(Warning)
| Base class for warnings about features which will be deprecated
| in the future.
|
| Method resolution order:
| PendingDeprecationWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class PermissionError(OSError)
| Not enough permissions.
|
| Method resolution order:
| PermissionError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ProcessLookupError(OSError)
| Process not found.
|
| Method resolution order:
| ProcessLookupError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class RecursionError(RuntimeError)
| Recursion limit exceeded.
|
| Method resolution order:
| RecursionError
| RuntimeError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ReferenceError(Exception)
| Weak ref proxy used after referent went away.
|
| Method resolution order:
| ReferenceError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ResourceWarning(Warning)
| Base class for warnings about resource usage.
|
| Method resolution order:
| ResourceWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class RuntimeError(Exception)
| Unspecified run-time error.
|
| Method resolution order:
| RuntimeError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| NotImplementedError
| RecursionError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class RuntimeWarning(Warning)
| Base class for warnings about dubious runtime behavior.
|
| Method resolution order:
| RuntimeWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class StopAsyncIteration(Exception)
| Signal the end from iterator.__anext__().
|
| Method resolution order:
| StopAsyncIteration
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class StopIteration(Exception)
| Signal the end from iterator.__next__().
|
| Method resolution order:
| StopIteration
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| value
| generator return value
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SyntaxError(Exception)
| Invalid syntax.
|
| Method resolution order:
| SyntaxError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| IndentationError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| end_lineno
| exception end lineno
|
| end_offset
| exception end offset
|
| filename
| exception filename
|
| lineno
| exception lineno
|
| msg
| exception msg
|
| offset
| exception offset
|
| print_file_and_line
| exception print_file_and_line
|
| text
| exception text
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SyntaxWarning(Warning)
| Base class for warnings about dubious syntax.
|
| Method resolution order:
| SyntaxWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SystemError(Exception)
| Internal error in the Python interpreter.
|
| Please report this to the Python maintainer, along with the traceback,
| the Python version, and the hardware/OS platform and version.
|
| Method resolution order:
| SystemError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class SystemExit(BaseException)
| Request to exit from the interpreter.
|
| Method resolution order:
| SystemExit
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| code
| exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Static methods inherited from BaseException:
|
| __new__(*args, **kwargs) class method of BaseException
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class TabError(IndentationError)
| Improper mixture of spaces and tabs.
|
| Method resolution order:
| TabError
| IndentationError
| SyntaxError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from SyntaxError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from SyntaxError:
|
| end_lineno
| exception end lineno
|
| end_offset
| exception end offset
|
| filename
| exception filename
|
| lineno
| exception lineno
|
| msg
| exception msg
|
| offset
| exception offset
|
| print_file_and_line
| exception print_file_and_line
|
| text
| exception text
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class TimeoutError(OSError)
| Timeout expired.
|
| Method resolution order:
| TimeoutError
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from OSError:
|
| __new__(*args, **kwargs) class method of OSError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class TypeError(Exception)
| Inappropriate argument type.
|
| Method resolution order:
| TypeError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnboundLocalError(NameError)
| Local name referenced but not bound to a value.
|
| Method resolution order:
| UnboundLocalError
| NameError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from NameError:
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from NameError:
|
| name
| name
|
| ----------------------------------------------------------------------
| Static methods inherited from Exception:
|
| __new__(*args, **kwargs) class method of Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnicodeDecodeError(UnicodeError)
| Unicode decoding error.
|
| Method resolution order:
| UnicodeDecodeError
| UnicodeError
| ValueError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| encoding
| exception encoding
|
| end
| exception end
|
| object
| exception object
|
| reason
| exception reason
|
| start
| exception start
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnicodeEncodeError(UnicodeError)
| Unicode encoding error.
|
| Method resolution order:
| UnicodeEncodeError
| UnicodeError
| ValueError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| encoding
| exception encoding
|
| end
| exception end
|
| object
| exception object
|
| reason
| exception reason
|
| start
| exception start
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnicodeError(ValueError)
| Unicode related error.
|
| Method resolution order:
| UnicodeError
| ValueError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| UnicodeDecodeError
| UnicodeEncodeError
| UnicodeTranslateError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnicodeTranslateError(UnicodeError)
| Unicode translation error.
|
| Method resolution order:
| UnicodeTranslateError
| UnicodeError
| ValueError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| encoding
| exception encoding
|
| end
| exception end
|
| object
| exception object
|
| reason
| exception reason
|
| start
| exception start
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UnicodeWarning(Warning)
| Base class for warnings about Unicode related problems, mostly
| related to conversion problems.
|
| Method resolution order:
| UnicodeWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class UserWarning(Warning)
| Base class for warnings generated by user code.
|
| Method resolution order:
| UserWarning
| Warning
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ValueError(Exception)
| Inappropriate argument value (of correct type).
|
| Method resolution order:
| ValueError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| UnicodeError
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class Warning(Exception)
| Base class for warning categories.
|
| Method resolution order:
| Warning
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BytesWarning
| DeprecationWarning
| EncodingWarning
| FutureWarning
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
WindowsError = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ZeroDivisionError(ArithmeticError)
| Second argument to a division or modulo operation was zero.
|
| Method resolution order:
| ZeroDivisionError
| ArithmeticError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class bool(int)
| bool(x) -> bool
|
| Returns True when the argument x is true, False otherwise.
| The builtins True and False are the only two instances of the class bool.
| The class bool is a subclass of the class int, and cannot be subclassed.
|
| Method resolution order:
| bool
| int
| object
|
| Methods defined here:
|
| __and__(self, value, /)
| Return self&value.
|
| __invert__(self, /)
| ~self
|
| __or__(self, value, /)
| Return self|value.
|
| __rand__(self, value, /)
| Return value&self.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __xor__(self, value, /)
| Return self^value.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
class bytearray(object)
| bytearray(iterable_of_ints) -> bytearray
| bytearray(string, encoding[, errors]) -> bytearray
| bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer
| bytearray(int) -> bytes array of size given by the parameter initialized with null bytes
| bytearray() -> empty bytes array
|
| Construct a mutable bytearray object from:
| - an iterable yielding integers in range(256)
| - a text string encoded using the specified encoding
| - a bytes or a buffer object
| - any object implementing the buffer API.
| - an integer
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __alloc__(...)
| B.__alloc__() -> int
|
| Return the number of bytes actually allocated.
|
| __buffer__(self, flags, /)
| Return a buffer object that exposes the underlying memory of the object.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __iadd__(self, value, /)
| Implement self+=value.
|
| __imul__(self, value, /)
| Implement self*=value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(self, /)
| Return state information for pickling.
|
| __reduce_ex__(self, proto=0, /)
| Return state information for pickling.
|
| __release_buffer__(self, buffer, /)
| Release the buffer object that exposes the underlying memory of the object.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(self, /)
| Returns the size of the bytearray object in memory, in bytes.
|
| __str__(self, /)
| Return str(self).
|
| append(self, item, /)
| Append a single item to the end of the bytearray.
|
| item
| The item to be appended.
|
| capitalize(...)
| B.capitalize() -> copy of B
|
| Return a copy of B with only its first character capitalized (ASCII)
| and the rest lower-cased.
|
| center(self, width, fillchar=b' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character.
|
| clear(self, /)
| Remove all items from the bytearray.
|
| copy(self, /)
| Return a copy of B.
|
| count(...)
| B.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of subsection sub in
| bytes B[start:end]. Optional arguments start and end are interpreted
| as in slice notation.
|
| decode(self, /, encoding='utf-8', errors='strict')
| Decode the bytearray using the codec registered for encoding.
|
| encoding
| The encoding with which to decode the bytearray.
| errors
| The error handling scheme to use for the handling of decoding errors.
| The default is 'strict' meaning that decoding errors raise a
| UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
| as well as any other name registered with codecs.register_error that
| can handle UnicodeDecodeErrors.
|
| endswith(...)
| B.endswith(suffix[, start[, end]]) -> bool
|
| Return True if B ends with the specified suffix, False otherwise.
| With optional start, test B beginning at that position.
| With optional end, stop comparing B at that position.
| suffix can also be a tuple of bytes to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| extend(self, iterable_of_ints, /)
| Append all the items from the iterator or sequence to the end of the bytearray.
|
| iterable_of_ints
| The iterable of items to append.
|
| find(...)
| B.find(sub[, start[, end]]) -> int
|
| Return the lowest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| hex(...)
| Create a string of hexadecimal numbers from a bytearray object.
|
| sep
| An optional single character or byte to separate hex bytes.
| bytes_per_sep
| How many bytes between separators. Positive values count from the
| right, negative values count from the left.
|
| Example:
| >>> value = bytearray([0xb9, 0x01, 0xef])
| >>> value.hex()
| 'b901ef'
| >>> value.hex(':')
| 'b9:01:ef'
| >>> value.hex(':', 2)
| 'b9:01ef'
| >>> value.hex(':', -2)
| 'b901:ef'
|
| index(...)
| B.index(sub[, start[, end]]) -> int
|
| Return the lowest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the subsection is not found.
|
| insert(self, index, item, /)
| Insert a single item into the bytearray before the given index.
|
| index
| The index where the value is to be inserted.
| item
| The item to be inserted.
|
| isalnum(...)
| B.isalnum() -> bool
|
| Return True if all characters in B are alphanumeric
| and there is at least one character in B, False otherwise.
|
| isalpha(...)
| B.isalpha() -> bool
|
| Return True if all characters in B are alphabetic
| and there is at least one character in B, False otherwise.
|
| isascii(...)
| B.isascii() -> bool
|
| Return True if B is empty or all characters in B are ASCII,
| False otherwise.
|
| isdigit(...)
| B.isdigit() -> bool
|
| Return True if all characters in B are digits
| and there is at least one character in B, False otherwise.
|
| islower(...)
| B.islower() -> bool
|
| Return True if all cased characters in B are lowercase and there is
| at least one cased character in B, False otherwise.
|
| isspace(...)
| B.isspace() -> bool
|
| Return True if all characters in B are whitespace
| and there is at least one character in B, False otherwise.
|
| istitle(...)
| B.istitle() -> bool
|
| Return True if B is a titlecased string and there is at least one
| character in B, i.e. uppercase characters may only follow uncased
| characters and lowercase characters only cased ones. Return False
| otherwise.
|
| isupper(...)
| B.isupper() -> bool
|
| Return True if all cased characters in B are uppercase and there is
| at least one cased character in B, False otherwise.
|
| join(self, iterable_of_bytes, /)
| Concatenate any number of bytes/bytearray objects.
|
| The bytearray whose method is called is inserted in between each pair.
|
| The result is returned as a new bytearray object.
|
| ljust(self, width, fillchar=b' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character.
|
| lower(...)
| B.lower() -> copy of B
|
| Return a copy of B with all ASCII characters converted to lowercase.
|
| lstrip(self, bytes=None, /)
| Strip leading bytes contained in the argument.
|
| If the argument is omitted or None, strip leading ASCII whitespace.
|
| partition(self, sep, /)
| Partition the bytearray into three parts using the given separator.
|
| This will search for the separator sep in the bytearray. If the separator is
| found, returns a 3-tuple containing the part before the separator, the
| separator itself, and the part after it as new bytearray objects.
|
| If the separator is not found, returns a 3-tuple containing the copy of the
| original bytearray object and two empty bytearray objects.
|
| pop(self, index=-1, /)
| Remove and return a single item from B.
|
| index
| The index from where to remove the item.
| -1 (the default value) means remove the last item.
|
| If no index argument is given, will pop the last item.
|
| remove(self, value, /)
| Remove the first occurrence of a value in the bytearray.
|
| value
| The value to remove.
|
| removeprefix(self, prefix, /)
| Return a bytearray with the given prefix string removed if present.
|
| If the bytearray starts with the prefix string, return
| bytearray[len(prefix):]. Otherwise, return a copy of the original
| bytearray.
|
| removesuffix(self, suffix, /)
| Return a bytearray with the given suffix string removed if present.
|
| If the bytearray ends with the suffix string and that suffix is not
| empty, return bytearray[:-len(suffix)]. Otherwise, return a copy of
| the original bytearray.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| reverse(self, /)
| Reverse the order of the values in B in place.
|
| rfind(...)
| B.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| B.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raise ValueError when the subsection is not found.
|
| rjust(self, width, fillchar=b' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character.
|
| rpartition(self, sep, /)
| Partition the bytearray into three parts using the given separator.
|
| This will search for the separator sep in the bytearray, starting at the end.
| If the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it as new bytearray
| objects.
|
| If the separator is not found, returns a 3-tuple containing two empty bytearray
| objects and the copy of the original bytearray object.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the sections in the bytearray, using sep as the delimiter.
|
| sep
| The delimiter according which to split the bytearray.
| None (the default value) means split on ASCII whitespace characters
| (space, tab, return, newline, formfeed, vertical tab).
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| Splitting is done starting at the end of the bytearray and working to the front.
|
| rstrip(self, bytes=None, /)
| Strip trailing bytes contained in the argument.
|
| If the argument is omitted or None, strip trailing ASCII whitespace.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the sections in the bytearray, using sep as the delimiter.
|
| sep
| The delimiter according which to split the bytearray.
| None (the default value) means split on ASCII whitespace characters
| (space, tab, return, newline, formfeed, vertical tab).
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the bytearray, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| B.startswith(prefix[, start[, end]]) -> bool
|
| Return True if B starts with the specified prefix, False otherwise.
| With optional start, test B beginning at that position.
| With optional end, stop comparing B at that position.
| prefix can also be a tuple of bytes to try.
|
| strip(self, bytes=None, /)
| Strip leading and trailing bytes contained in the argument.
|
| If the argument is omitted or None, strip leading and trailing ASCII whitespace.
|
| swapcase(...)
| B.swapcase() -> copy of B
|
| Return a copy of B with uppercase ASCII characters converted
| to lowercase ASCII and vice versa.
|
| title(...)
| B.title() -> copy of B
|
| Return a titlecased version of B, i.e. ASCII words start with uppercase
| characters, all remaining cased characters have lowercase.
|
| translate(self, table, /, delete=b'')
| Return a copy with each character mapped by the given translation table.
|
| table
| Translation table, which must be a bytes object of length 256.
|
| All characters occurring in the optional argument delete are removed.
| The remaining characters are mapped through the given translation table.
|
| upper(...)
| B.upper() -> copy of B
|
| Return a copy of B with all ASCII characters converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The original string is never truncated.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromhex(string, /)
| Create a bytearray object from a string of hexadecimal numbers.
|
| Spaces between two numbers are accepted.
| Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef')
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| maketrans(frm, to, /)
| Return a translation table useable for the bytes or bytearray translate method.
|
| The returned table will be one where each byte in frm is mapped to the byte at
| the same position in to.
|
| The bytes objects frm and to must be of the same length.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
class bytes(object)
| bytes(iterable_of_ints) -> bytes
| bytes(string, encoding[, errors]) -> bytes
| bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
| bytes(int) -> bytes object of size given by the parameter initialized with null bytes
| bytes() -> empty bytes object
|
| Construct an immutable array of bytes from:
| - an iterable yielding integers in range(256)
| - a text string encoded using the specified encoding
| - any object implementing the buffer API.
| - an integer
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __buffer__(self, flags, /)
| Return a buffer object that exposes the underlying memory of the object.
|
| __bytes__(self, /)
| Convert this value to exact type bytes.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __str__(self, /)
| Return str(self).
|
| capitalize(...)
| B.capitalize() -> copy of B
|
| Return a copy of B with only its first character capitalized (ASCII)
| and the rest lower-cased.
|
| center(self, width, fillchar=b' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character.
|
| count(...)
| B.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of subsection sub in
| bytes B[start:end]. Optional arguments start and end are interpreted
| as in slice notation.
|
| decode(self, /, encoding='utf-8', errors='strict')
| Decode the bytes using the codec registered for encoding.
|
| encoding
| The encoding with which to decode the bytes.
| errors
| The error handling scheme to use for the handling of decoding errors.
| The default is 'strict' meaning that decoding errors raise a
| UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
| as well as any other name registered with codecs.register_error that
| can handle UnicodeDecodeErrors.
|
| endswith(...)
| B.endswith(suffix[, start[, end]]) -> bool
|
| Return True if B ends with the specified suffix, False otherwise.
| With optional start, test B beginning at that position.
| With optional end, stop comparing B at that position.
| suffix can also be a tuple of bytes to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| B.find(sub[, start[, end]]) -> int
|
| Return the lowest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| hex(...)
| Create a string of hexadecimal numbers from a bytes object.
|
| sep
| An optional single character or byte to separate hex bytes.
| bytes_per_sep
| How many bytes between separators. Positive values count from the
| right, negative values count from the left.
|
| Example:
| >>> value = b'\xb9\x01\xef'
| >>> value.hex()
| 'b901ef'
| >>> value.hex(':')
| 'b9:01:ef'
| >>> value.hex(':', 2)
| 'b9:01ef'
| >>> value.hex(':', -2)
| 'b901:ef'
|
| index(...)
| B.index(sub[, start[, end]]) -> int
|
| Return the lowest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the subsection is not found.
|
| isalnum(...)
| B.isalnum() -> bool
|
| Return True if all characters in B are alphanumeric
| and there is at least one character in B, False otherwise.
|
| isalpha(...)
| B.isalpha() -> bool
|
| Return True if all characters in B are alphabetic
| and there is at least one character in B, False otherwise.
|
| isascii(...)
| B.isascii() -> bool
|
| Return True if B is empty or all characters in B are ASCII,
| False otherwise.
|
| isdigit(...)
| B.isdigit() -> bool
|
| Return True if all characters in B are digits
| and there is at least one character in B, False otherwise.
|
| islower(...)
| B.islower() -> bool
|
| Return True if all cased characters in B are lowercase and there is
| at least one cased character in B, False otherwise.
|
| isspace(...)
| B.isspace() -> bool
|
| Return True if all characters in B are whitespace
| and there is at least one character in B, False otherwise.
|
| istitle(...)
| B.istitle() -> bool
|
| Return True if B is a titlecased string and there is at least one
| character in B, i.e. uppercase characters may only follow uncased
| characters and lowercase characters only cased ones. Return False
| otherwise.
|
| isupper(...)
| B.isupper() -> bool
|
| Return True if all cased characters in B are uppercase and there is
| at least one cased character in B, False otherwise.
|
| join(self, iterable_of_bytes, /)
| Concatenate any number of bytes objects.
|
| The bytes whose method is called is inserted in between each pair.
|
| The result is returned as a new bytes object.
|
| Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'.
|
| ljust(self, width, fillchar=b' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character.
|
| lower(...)
| B.lower() -> copy of B
|
| Return a copy of B with all ASCII characters converted to lowercase.
|
| lstrip(self, bytes=None, /)
| Strip leading bytes contained in the argument.
|
| If the argument is omitted or None, strip leading ASCII whitespace.
|
| partition(self, sep, /)
| Partition the bytes into three parts using the given separator.
|
| This will search for the separator sep in the bytes. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original bytes
| object and two empty bytes objects.
|
| removeprefix(self, prefix, /)
| Return a bytes object with the given prefix string removed if present.
|
| If the bytes starts with the prefix string, return bytes[len(prefix):].
| Otherwise, return a copy of the original bytes.
|
| removesuffix(self, suffix, /)
| Return a bytes object with the given suffix string removed if present.
|
| If the bytes ends with the suffix string and that suffix is not empty,
| return bytes[:-len(prefix)]. Otherwise, return a copy of the original
| bytes.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| B.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| B.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in B where subsection sub is found,
| such that sub is contained within B[start,end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raise ValueError when the subsection is not found.
|
| rjust(self, width, fillchar=b' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character.
|
| rpartition(self, sep, /)
| Partition the bytes into three parts using the given separator.
|
| This will search for the separator sep in the bytes, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty bytes
| objects and the original bytes object.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the sections in the bytes, using sep as the delimiter.
|
| sep
| The delimiter according which to split the bytes.
| None (the default value) means split on ASCII whitespace characters
| (space, tab, return, newline, formfeed, vertical tab).
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| Splitting is done starting at the end of the bytes and working to the front.
|
| rstrip(self, bytes=None, /)
| Strip trailing bytes contained in the argument.
|
| If the argument is omitted or None, strip trailing ASCII whitespace.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the sections in the bytes, using sep as the delimiter.
|
| sep
| The delimiter according which to split the bytes.
| None (the default value) means split on ASCII whitespace characters
| (space, tab, return, newline, formfeed, vertical tab).
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the bytes, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| B.startswith(prefix[, start[, end]]) -> bool
|
| Return True if B starts with the specified prefix, False otherwise.
| With optional start, test B beginning at that position.
| With optional end, stop comparing B at that position.
| prefix can also be a tuple of bytes to try.
|
| strip(self, bytes=None, /)
| Strip leading and trailing bytes contained in the argument.
|
| If the argument is omitted or None, strip leading and trailing ASCII whitespace.
|
| swapcase(...)
| B.swapcase() -> copy of B
|
| Return a copy of B with uppercase ASCII characters converted
| to lowercase ASCII and vice versa.
|
| title(...)
| B.title() -> copy of B
|
| Return a titlecased version of B, i.e. ASCII words start with uppercase
| characters, all remaining cased characters have lowercase.
|
| translate(self, table, /, delete=b'')
| Return a copy with each character mapped by the given translation table.
|
| table
| Translation table, which must be a bytes object of length 256.
|
| All characters occurring in the optional argument delete are removed.
| The remaining characters are mapped through the given translation table.
|
| upper(...)
| B.upper() -> copy of B
|
| Return a copy of B with all ASCII characters converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The original string is never truncated.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| fromhex(string, /)
| Create a bytes object from a string of hexadecimal numbers.
|
| Spaces between two numbers are accepted.
| Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| maketrans(frm, to, /)
| Return a translation table useable for the bytes or bytearray translate method.
|
| The returned table will be one where each byte in frm is mapped to the byte at
| the same position in to.
|
| The bytes objects frm and to must be of the same length.
class classmethod(object)
| classmethod(function) -> method
|
| Convert a function to be a class method.
|
| A class method receives the class as implicit first argument,
| just like an instance method receives the instance.
| To declare a class method, use this idiom:
|
| class C:
| @classmethod
| def f(cls, arg1, arg2, argN):
| ...
|
| It can be called either on the class (e.g. C.f()) or on an instance
| (e.g. C().f()). The instance is ignored except for its class.
| If a class method is called for a derived class, the derived class
| object is passed as the implied first argument.
|
| Class methods are different than C++ or Java static methods.
| If you want those, see the staticmethod builtin.
|
| Methods defined here:
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
|
| __func__
|
| __isabstractmethod__
|
| __wrapped__
class complex(object)
| complex(real=0, imag=0)
|
| Create a complex number from a string or numbers.
|
| If a string is given, parse it as a complex number.
| If a single number is given, convert it to a complex number.
| If the 'real' or 'imag' arguments are given, create a complex number
| with the specified real and imaginary components.
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __complex__(self, /)
| Convert this value to exact type complex.
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmul__(self, value, /)
| Return value*self.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| conjugate(self, /)
| Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| imag
| the imaginary part of a complex number
|
| real
| the real part of a complex number
class dict(object)
| dict() -> new empty dictionary
| dict(mapping) -> new dictionary initialized from a mapping object's
| (key, value) pairs
| dict(iterable) -> new dictionary initialized as if via:
| d = {}
| for k, v in iterable:
| d[k] = v
| dict(**kwargs) -> new dictionary initialized with the name=value pairs
| in the keyword argument list. For example: dict(one=1, two=2)
|
| Built-in subclasses:
| StgDict
|
| Methods defined here:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __ror__(self, value, /)
| Return value|self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| fromkeys(iterable, value=None, /)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
class enumerate(object)
| enumerate(iterable, start=0)
|
| Return an enumerate object.
|
| iterable
| an object supporting iteration
|
| The enumerate object yields pairs containing a count (from start, which
| defaults to zero) and a value yielded by the iterable argument.
|
| enumerate is useful for obtaining an indexed list:
| (0, seq[0]), (1, seq[1]), (2, seq[2]), ...
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class filter(object)
| filter(function or None, iterable) --> filter object
|
| Return an iterator yielding those items of iterable for which function(item)
| is true. If function is None, return the items that are true.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class float(object)
| float(x=0, /)
|
| Convert a string or number to a floating-point number, if possible.
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(self, /)
| Return the ceiling as an Integral.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(self, /)
| Return the floor as an Integral.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Formats the float according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(self, ndigits=None, /)
| Return the Integral closest to x, rounding half toward even.
|
| When an argument is passed, work like built-in round(x, ndigits).
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(self, /)
| Return the Integral closest to x between 0 and x.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is exactly equal to the original float.
|
| The ratio is in lowest terms and has a positive denominator. Raise
| OverflowError on infinities and a ValueError on NaNs.
|
| >>> (10.0).as_integer_ratio()
| (10, 1)
| >>> (0.0).as_integer_ratio()
| (0, 1)
| >>> (-.25).as_integer_ratio()
| (-1, 4)
|
| conjugate(self, /)
| Return self, the complex conjugate of any float.
|
| hex(self, /)
| Return a hexadecimal representation of a floating-point number.
|
| >>> (-0.1).hex()
| '-0x1.999999999999ap-4'
| >>> 3.14159.hex()
| '0x1.921f9f01b866ep+1'
|
| is_integer(self, /)
| Return True if the float is an integer.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __getformat__(typestr, /)
| You probably don't want to use this function.
|
| typestr
| Must be 'double' or 'float'.
|
| It exists mainly to be used in Python's test suite.
|
| This function returns whichever of 'unknown', 'IEEE, big-endian' or 'IEEE,
| little-endian' best describes the format of floating-point numbers used by the
| C type named by typestr.
|
| fromhex(string, /)
| Create a floating-point number from a hexadecimal string.
|
| >>> float.fromhex('0x1.ffffp10')
| 2047.984375
| >>> float.fromhex('-0x1p-1074')
| -5e-324
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| imag
| the imaginary part of a complex number
|
| real
| the real part of a complex number
class frozenset(object)
| frozenset() -> empty frozenset object
| frozenset(iterable) -> frozenset object
|
| Build an immutable unordered collection of unique elements.
|
| Methods defined here:
|
| __and__(self, value, /)
| Return self&value.
|
| __contains__(...)
| x.__contains__(y) <==> y in x.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __rand__(self, value, /)
| Return value&self.
|
| __reduce__(...)
| Return state information for pickling.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(...)
| S.__sizeof__() -> size of S in memory, in bytes
|
| __sub__(self, value, /)
| Return self-value.
|
| __xor__(self, value, /)
| Return self^value.
|
| copy(...)
| Return a shallow copy of a set.
|
| difference(...)
| Return the difference of two or more sets as a new set.
|
| (i.e. all elements that are in this set but not the others.)
|
| intersection(...)
| Return the intersection of two sets as a new set.
|
| (i.e. all elements that are in both sets.)
|
| isdisjoint(...)
| Return True if two sets have a null intersection.
|
| issubset(self, other, /)
| Test whether every element in the set is in other.
|
| issuperset(self, other, /)
| Test whether every element in other is in the set.
|
| symmetric_difference(...)
| Return the symmetric difference of two sets as a new set.
|
| (i.e. all elements that are in exactly one of the sets.)
|
| union(...)
| Return the union of sets as a new set.
|
| (i.e. all elements that are in either set.)
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
class list(object)
| list(iterable=(), /)
|
| Built-in mutable sequence.
|
| If no argument is given, the constructor creates a new empty list.
| The argument must be an iterable if specified.
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, index, /)
| Return self[index].
|
| __gt__(self, value, /)
| Return self>value.
|
| __iadd__(self, value, /)
| Implement self+=value.
|
| __imul__(self, value, /)
| Implement self*=value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(self, /)
| Return a reverse iterator over the list.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(self, /)
| Return the size of the list in memory, in bytes.
|
| append(self, object, /)
| Append object to the end of the list.
|
| clear(self, /)
| Remove all items from list.
|
| copy(self, /)
| Return a shallow copy of the list.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| extend(self, iterable, /)
| Extend list by appending elements from the iterable.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| insert(self, index, object, /)
| Insert object before index.
|
| pop(self, index=-1, /)
| Remove and return item at index (default last).
|
| Raises IndexError if list is empty or index is out of range.
|
| remove(self, value, /)
| Remove first occurrence of value.
|
| Raises ValueError if the value is not present.
|
| reverse(self, /)
| Reverse *IN PLACE*.
|
| sort(self, /, *, key=None, reverse=False)
| Sort the list in ascending order and return None.
|
| The sort is in-place (i.e. the list itself is modified) and stable (i.e. the
| order of two equal elements is maintained).
|
| If a key function is given, apply it once to each list item and sort them,
| ascending or descending, according to their function values.
|
| The reverse flag can be set to sort in descending order.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
class map(object)
| map(func, *iterables) --> map object
|
| Make an iterator that computes the function using arguments from
| each of the iterables. Stops when the shortest iterable is exhausted.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class memoryview(object)
| memoryview(object)
|
| Create a new memoryview object which references the given object.
|
| Methods defined here:
|
| __buffer__(self, flags, /)
| Return a buffer object that exposes the underlying memory of the object.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __enter__(...)
|
| __eq__(self, value, /)
| Return self==value.
|
| __exit__(...)
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __release_buffer__(self, buffer, /)
| Release the buffer object that exposes the underlying memory of the object.
|
| __repr__(self, /)
| Return repr(self).
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| cast(...)
| Cast a memoryview to a new format or shape.
|
| hex(...)
| Return the data in the buffer as a str of hexadecimal numbers.
|
| sep
| An optional single character or byte to separate hex bytes.
| bytes_per_sep
| How many bytes between separators. Positive values count from the
| right, negative values count from the left.
|
| Example:
| >>> value = memoryview(b'\xb9\x01\xef')
| >>> value.hex()
| 'b901ef'
| >>> value.hex(':')
| 'b9:01:ef'
| >>> value.hex(':', 2)
| 'b9:01ef'
| >>> value.hex(':', -2)
| 'b901:ef'
|
| release(self, /)
| Release the underlying buffer exposed by the memoryview object.
|
| tobytes(self, /, order='C')
| Return the data in the buffer as a byte string.
|
| Order can be {'C', 'F', 'A'}. When order is 'C' or 'F', the data of the
| original array is converted to C or Fortran order. For contiguous views,
| 'A' returns an exact copy of the physical memory. In particular, in-memory
| Fortran order is preserved. For non-contiguous views, the data is converted
| to C first. order=None is the same as order='C'.
|
| tolist(self, /)
| Return the data in the buffer as a list of elements.
|
| toreadonly(self, /)
| Return a readonly version of the memoryview.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| c_contiguous
| A bool indicating whether the memory is C contiguous.
|
| contiguous
| A bool indicating whether the memory is contiguous.
|
| f_contiguous
| A bool indicating whether the memory is Fortran contiguous.
|
| format
| A string containing the format (in struct module style)
| for each element in the view.
|
| itemsize
| The size in bytes of each element of the memoryview.
|
| nbytes
| The amount of space in bytes that the array would use in
| a contiguous representation.
|
| ndim
| An integer indicating how many dimensions of a multi-dimensional
| array the memory represents.
|
| obj
| The underlying object of the memoryview.
|
| readonly
| A bool indicating whether the memory is read only.
|
| shape
| A tuple of ndim integers giving the shape of the memory
| as an N-dimensional array.
|
| strides
| A tuple of ndim integers giving the size in bytes to access
| each element for each dimension of the array.
|
| suboffsets
| A tuple of integers used internally for PIL-style arrays.
class object
| The base class of the class hierarchy.
|
| When called, it accepts no arguments and returns a new featureless
| instance that has no instance attributes and cannot be given any.
|
| Built-in subclasses:
| anext_awaitable
| async_generator
| async_generator_asend
| async_generator_athrow
| ... and 90 other subclasses
|
| Methods defined here:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __dir__(self, /)
| Default dir() implementation.
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(self, format_spec, /)
| Default object formatter.
|
| Return str(self) if format_spec is empty. Raise TypeError otherwise.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getstate__(self, /)
| Helper for pickle.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(self, /)
| Helper for pickle.
|
| __reduce_ex__(self, protocol, /)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __sizeof__(self, /)
| Size of object in memory, in bytes.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __init_subclass__(...)
| This method is called when a class is subclassed.
|
| The default implementation does nothing. It may be
| overridden to extend subclasses.
|
| __subclasshook__(...)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __class__ = <class 'type'>
| type(object) -> the object's type
| type(name, bases, dict, **kwds) -> a new type
class property(object)
| property(fget=None, fset=None, fdel=None, doc=None)
|
| Property attribute.
|
| fget
| function to be used for getting an attribute value
| fset
| function to be used for setting an attribute value
| fdel
| function to be used for del'ing an attribute
| doc
| docstring
|
| Typical use is to define a managed attribute x:
|
| class C(object):
| def getx(self): return self._x
| def setx(self, value): self._x = value
| def delx(self): del self._x
| x = property(getx, setx, delx, "I'm the 'x' property.")
|
| Decorators make defining new properties or modifying existing ones easy:
|
| class C(object):
| @property
| def x(self):
| "I am the 'x' property."
| return self._x
| @x.setter
| def x(self, value):
| self._x = value
| @x.deleter
| def x(self):
| del self._x
|
| Methods defined here:
|
| __delete__(self, instance, /)
| Delete an attribute of instance.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __set__(self, instance, value, /)
| Set an attribute of instance to value.
|
| __set_name__(...)
| Method to set name of a property.
|
| deleter(...)
| Descriptor to obtain a copy of the property with a different deleter.
|
| getter(...)
| Descriptor to obtain a copy of the property with a different getter.
|
| setter(...)
| Descriptor to obtain a copy of the property with a different setter.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __isabstractmethod__
|
| fdel
|
| fget
|
| fset
class range(object)
| range(stop) -> range object
| range(start, stop[, step]) -> range object
|
| Return an object that produces a sequence of integers from start (inclusive)
| to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.
| start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.
| These are exactly the valid indices for a list of 4 elements.
| When step is given, it specifies the increment (or decrement).
|
| Methods defined here:
|
| __bool__(self, /)
| True if self else False
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(...)
| Return a reverse iterator.
|
| count(...)
| rangeobject.count(value) -> integer -- return number of occurrences of value
|
| index(...)
| rangeobject.index(value) -> integer -- return index of value.
| Raise ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| start
|
| step
|
| stop
class reversed(object)
| reversed(sequence, /)
|
| Return a reverse iterator over the values of the given sequence.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __length_hint__(...)
| Private method returning an estimate of len(list(it)).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class set(object)
| set() -> new empty set object
| set(iterable) -> new set object
|
| Build an unordered collection of unique elements.
|
| Methods defined here:
|
| __and__(self, value, /)
| Return self&value.
|
| __contains__(...)
| x.__contains__(y) <==> y in x.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __iand__(self, value, /)
| Return self&=value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __isub__(self, value, /)
| Return self-=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __ixor__(self, value, /)
| Return self^=value.
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __rand__(self, value, /)
| Return value&self.
|
| __reduce__(...)
| Return state information for pickling.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(...)
| S.__sizeof__() -> size of S in memory, in bytes
|
| __sub__(self, value, /)
| Return self-value.
|
| __xor__(self, value, /)
| Return self^value.
|
| add(...)
| Add an element to a set.
|
| This has no effect if the element is already present.
|
| clear(...)
| Remove all elements from this set.
|
| copy(...)
| Return a shallow copy of a set.
|
| difference(...)
| Return the difference of two or more sets as a new set.
|
| (i.e. all elements that are in this set but not the others.)
|
| difference_update(...)
| Remove all elements of another set from this set.
|
| discard(...)
| Remove an element from a set if it is a member.
|
| Unlike set.remove(), the discard() method does not raise
| an exception when an element is missing from the set.
|
| intersection(...)
| Return the intersection of two sets as a new set.
|
| (i.e. all elements that are in both sets.)
|
| intersection_update(...)
| Update a set with the intersection of itself and another.
|
| isdisjoint(...)
| Return True if two sets have a null intersection.
|
| issubset(self, other, /)
| Test whether every element in the set is in other.
|
| issuperset(self, other, /)
| Test whether every element in other is in the set.
|
| pop(...)
| Remove and return an arbitrary set element.
| Raises KeyError if the set is empty.
|
| remove(...)
| Remove an element from a set; it must be a member.
|
| If the element is not a member, raise a KeyError.
|
| symmetric_difference(...)
| Return the symmetric difference of two sets as a new set.
|
| (i.e. all elements that are in exactly one of the sets.)
|
| symmetric_difference_update(...)
| Update a set with the symmetric difference of itself and another.
|
| union(...)
| Return the union of sets as a new set.
|
| (i.e. all elements that are in either set.)
|
| update(...)
| Update a set with the union of itself and others.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
class slice(object)
| slice(stop)
| slice(start, stop[, step])
|
| Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).
|
| Methods defined here:
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __reduce__(...)
| Return state information for pickling.
|
| __repr__(self, /)
| Return repr(self).
|
| indices(...)
| S.indices(len) -> (start, stop, stride)
|
| Assuming a sequence of length len, calculate the start and stop
| indices, and the stride length of the extended slice described by
| S. Out of bounds indices are clipped in a manner consistent with the
| handling of normal slices.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| start
|
| step
|
| stop
class staticmethod(object)
| staticmethod(function) -> method
|
| Convert a function to be a static method.
|
| A static method does not receive an implicit first argument.
| To declare a static method, use this idiom:
|
| class C:
| @staticmethod
| def f(arg1, arg2, argN):
| ...
|
| It can be called either on the class (e.g. C.f()) or on an instance
| (e.g. C().f()). Both the class and the instance are ignored, and
| neither is passed implicitly as the first argument to the method.
|
| Static methods in Python are similar to those found in Java or C++.
| For a more advanced concept, see the classmethod builtin.
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
|
| __func__
|
| __isabstractmethod__
|
| __wrapped__
class str(object)
| str(object='') -> str
| str(bytes_or_buffer[, encoding[, errors]]) -> str
|
| Create a new string object from the given object. If encoding or
| errors is specified, then the object must expose a data buffer
| that will be decoded using the given encoding and error handler.
| Otherwise, returns the result of object.__str__() (if defined)
| or repr(object).
| encoding defaults to sys.getdefaultencoding().
| errors defaults to 'strict'.
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(self, format_spec, /)
| Return a formatted version of the string as described by format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| __str__(self, /)
| Return str(self).
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
class super(object)
| super() -> same as super(__class__, <first argument>)
| super(type) -> unbound super object
| super(type, obj) -> bound super object; requires isinstance(obj, type)
| super(type, type2) -> bound super object; requires issubclass(type2, type)
| Typical use to call a cooperative superclass method:
| class C(B):
| def meth(self, arg):
| super().meth(arg)
| This works for class methods too:
| class C(B):
| @classmethod
| def cmeth(cls, arg):
| super().cmeth(arg)
|
| Methods defined here:
|
| __get__(self, instance, owner=None, /)
| Return an attribute of instance, which is of type owner.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __self__
| the instance invoking super(); may be None
|
| __self_class__
| the type of the instance invoking super(); may be None
|
| __thisclass__
| the class invoking super()
class tuple(object)
| tuple(iterable=(), /)
|
| Built-in immutable sequence.
|
| If no argument is given, the constructor returns an empty tuple.
| If iterable is specified the tuple is initialized from iterable's items.
|
| If the argument is a tuple, the return value is the same object.
|
| Built-in subclasses:
| asyncgen_hooks
| UnraisableHookArgs
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
class type(object)
| type(object) -> the object's type
| type(name, bases, dict, **kwds) -> a new type
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __dir__(self, /)
| Specialized __dir__ implementation for types.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __instancecheck__(self, instance, /)
| Check if an object is an instance.
|
| __or__(self, value, /)
| Return self|value.
|
| __repr__(self, /)
| Return repr(self).
|
| __ror__(self, value, /)
| Return value|self.
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __sizeof__(self, /)
| Return memory consumption of the type object.
|
| __subclasscheck__(self, subclass, /)
| Check if a class is a subclass.
|
| __subclasses__(self, /)
| Return a list of immediate subclasses.
|
| mro(self, /)
| Return a type's method resolution order.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __prepare__(...)
| __prepare__() -> dict
| used to create the namespace for the class statement
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __abstractmethods__
|
| __annotations__
|
| __dict__
|
| __text_signature__
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __base__ = <class 'object'>
| The base class of the class hierarchy.
|
| When called, it accepts no arguments and returns a new featureless
| instance that has no instance attributes and cannot be given any.
|
|
| __bases__ = (<class 'object'>,)
|
| __basicsize__ = 920
|
| __dictoffset__ = 264
|
| __flags__ = 2156420354
|
| __itemsize__ = 40
|
| __mro__ = (<class 'type'>, <class 'object'>)
|
| __type_params__ = ()
|
| __weakrefoffset__ = 368
class zip(object)
| zip(*iterables, strict=False) --> Yield tuples until an input is exhausted.
|
| >>> list(zip('abcdefg', range(3), range(4)))
| [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]
|
| The zip object yields n-length tuples, where n is the number of iterables
| passed as positional arguments to zip(). The i-th element in every tuple
| comes from the i-th iterable argument to zip(). This continues until the
| shortest argument is exhausted.
|
| If strict is true and one of the arguments is exhausted before the others,
| raise a ValueError.
|
| Methods defined here:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __iter__(self, /)
| Implement iter(self).
|
| __next__(self, /)
| Implement next(self).
|
| __reduce__(...)
| Return state information for pickling.
|
| __setstate__(...)
| Set state information for unpickling.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
FUNCTIONS
__build_class__(...)
__build_class__(func, name, /, *bases, [metaclass], **kwds) -> class
Internal helper function used by the class statement.
__import__(name, globals=None, locals=None, fromlist=(), level=0)
Import a module.
Because this function is meant for use by the Python
interpreter and not for general use, it is better to use
importlib.import_module() to programmatically import a module.
The globals argument is only used to determine the context;
they are not modified. The locals argument is unused. The fromlist
should be a list of names to emulate ``from name import ...``, or an
empty list to emulate ``import name``.
When importing a module from a package, note that __import__('A.B', ...)
returns package A when fromlist is empty, but its submodule B when
fromlist is not empty. The level argument is used to determine whether to
perform absolute or relative imports: 0 is absolute, while a positive number
is the number of parent directories to search relative to the current module.
abs(x, /)
Return the absolute value of the argument.
aiter(async_iterable, /)
Return an AsyncIterator for an AsyncIterable object.
all(iterable, /)
Return True if bool(x) is True for all values x in the iterable.
If the iterable is empty, return True.
anext(...)
async anext(aiterator[, default])
Return the next item from the async iterator. If default is given and the async
iterator is exhausted, it is returned instead of raising StopAsyncIteration.
any(iterable, /)
Return True if bool(x) is True for any x in the iterable.
If the iterable is empty, return False.
ascii(obj, /)
Return an ASCII-only representation of an object.
As repr(), return a string containing a printable representation of an
object, but escape the non-ASCII characters in the string returned by
repr() using \\x, \\u or \\U escapes. This generates a string similar
to that returned by repr() in Python 2.
bin(number, /)
Return the binary representation of an integer.
>>> bin(2796202)
'0b1010101010101010101010'
breakpoint(...)
breakpoint(*args, **kws)
Call sys.breakpointhook(*args, **kws). sys.breakpointhook() must accept
whatever arguments are passed.
By default, this drops you into the pdb debugger.
callable(obj, /)
Return whether the object is callable (i.e., some kind of function).
Note that classes are callable, as are instances of classes with a
__call__() method.
chr(i, /)
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.
compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1, *, _feature_version=-1)
Compile source into a code object that can be executed by exec() or eval().
The source code may represent a Python module, statement or expression.
The filename will be used for run-time error messages.
The mode must be 'exec' to compile a module, 'single' to compile a
single (interactive) statement, or 'eval' to compile an expression.
The flags argument, if present, controls which future statements influence
the compilation of the code.
The dont_inherit argument, if true, stops the compilation inheriting
the effects of any future statements in effect in the code calling
compile; if absent or false these statements do influence the compilation,
in addition to any features explicitly specified.
delattr(obj, name, /)
Deletes the named attribute from the given object.
delattr(x, 'y') is equivalent to ``del x.y``
dir(...)
Show attributes of an object.
If called without an argument, return the names in the current scope.
Else, return an alphabetized list of names comprising (some of) the attributes
of the given object, and of attributes reachable from it.
If the object supplies a method named __dir__, it will be used; otherwise
the default dir() logic is used and returns:
for a module object: the module's attributes.
for a class object: its attributes, and recursively the attributes
of its bases.
for any other object: its attributes, its class's attributes, and
recursively the attributes of its class's base classes.
divmod(x, y, /)
Return the tuple (x//y, x%y). Invariant: div*y + mod == x.
eval(source, globals=None, locals=None, /)
Evaluate the given source in the context of globals and locals.
The source may be a string representing a Python expression
or a code object as returned by compile().
The globals must be a dictionary and locals can be any mapping,
defaulting to the current globals and locals.
If only globals is given, locals defaults to it.
exec(source, globals=None, locals=None, /, *, closure=None)
Execute the given source in the context of globals and locals.
The source may be a string representing one or more Python statements
or a code object as returned by compile().
The globals must be a dictionary and locals can be any mapping,
defaulting to the current globals and locals.
If only globals is given, locals defaults to it.
The closure must be a tuple of cellvars, and can only be used
when source is a code object requiring exactly that many cellvars.
format(value, format_spec='', /)
Return type(value).__format__(value, format_spec)
Many built-in types implement format_spec according to the
Format Specification Mini-language. See help('FORMATTING').
If type(value) does not supply a method named __format__
and format_spec is empty, then str(value) is returned.
See also help('SPECIALMETHODS').
getattr(...)
Get a named attribute from an object.
getattr(x, 'y') is equivalent to x.y
When a default argument is given, it is returned when the attribute doesn't
exist; without it, an exception is raised in that case.
globals()
Return the dictionary containing the current scope's global variables.
NOTE: Updates to this dictionary *will* affect name lookups in the current
global scope and vice-versa.
hasattr(obj, name, /)
Return whether the object has an attribute with the given name.
This is done by calling getattr(obj, name) and catching AttributeError.
hash(obj, /)
Return the hash value for the given object.
Two objects that compare equal must also have the same hash value, but the
reverse is not necessarily true.
hex(number, /)
Return the hexadecimal representation of an integer.
>>> hex(12648430)
'0xc0ffee'
id(obj, /)
Return the identity of an object.
This is guaranteed to be unique among simultaneously existing objects.
(CPython uses the object's memory address.)
input(prompt='', /)
Read a string from standard input. The trailing newline is stripped.
The prompt string, if given, is printed to standard output without a
trailing newline before reading input.
If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
On *nix systems, readline is used if available.
isinstance(obj, class_or_tuple, /)
Return whether an object is an instance of a class or of a subclass thereof.
A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to
check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)
or ...`` etc.
issubclass(cls, class_or_tuple, /)
Return whether 'cls' is derived from another class or is the same class.
A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to
check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)
or ...``.
iter(...)
Get an iterator from an object.
In the first form, the argument must supply its own iterator, or be a sequence.
In the second form, the callable is called until it returns the sentinel.
len(obj, /)
Return the number of items in a container.
locals()
Return a dictionary containing the current scope's local variables.
NOTE: Whether or not updates to this dictionary will affect name lookups in
the local scope and vice-versa is *implementation dependent* and not
covered by any backwards compatibility guarantees.
max(...)
max(iterable, *[, default=obj, key=func]) -> value
max(arg1, arg2, *args, *[, key=func]) -> value
With a single iterable argument, return its biggest item. The
default keyword-only argument specifies an object to return if
the provided iterable is empty.
With two or more arguments, return the largest argument.
min(...)
min(iterable, *[, default=obj, key=func]) -> value
min(arg1, arg2, *args, *[, key=func]) -> value
With a single iterable argument, return its smallest item. The
default keyword-only argument specifies an object to return if
the provided iterable is empty.
With two or more arguments, return the smallest argument.
next(...)
Return the next item from the iterator.
If default is given and the iterator is exhausted,
it is returned instead of raising StopIteration.
oct(number, /)
Return the octal representation of an integer.
>>> oct(342391)
'0o1234567'
open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
Open file and return a stream. Raise OSError upon failure.
file is either a text or byte string giving the name (and the path
if the file isn't in the current working directory) of the file to
be opened or an integer file descriptor of the file to be
wrapped. (If a file descriptor is given, it is closed when the
returned I/O object is closed, unless closefd is set to False.)
mode is an optional string that specifies the mode in which the file
is opened. It defaults to 'r' which means open for reading in text
mode. Other common values are 'w' for writing (truncating the file if
it already exists), 'x' for creating and writing to a new file, and
'a' for appending (which on some Unix systems, means that all writes
append to the end of the file regardless of the current seek position).
In text mode, if encoding is not specified the encoding used is platform
dependent: locale.getencoding() is called to get the current locale encoding.
(For reading and writing raw bytes use binary mode and leave encoding
unspecified.) The available modes are:
========= ===============================================================
Character Meaning
--------- ---------------------------------------------------------------
'r' open for reading (default)
'w' open for writing, truncating the file first
'x' create a new file and open it for writing
'a' open for writing, appending to the end of the file if it exists
'b' binary mode
't' text mode (default)
'+' open a disk file for updating (reading and writing)
========= ===============================================================
The default mode is 'rt' (open for reading text). For binary random
access, the mode 'w+b' opens and truncates the file to 0 bytes, while
'r+b' opens the file without truncation. The 'x' mode implies 'w' and
raises an `FileExistsError` if the file already exists.
Python distinguishes between files opened in binary and text modes,
even when the underlying operating system doesn't. Files opened in
binary mode (appending 'b' to the mode argument) return contents as
bytes objects without any decoding. In text mode (the default, or when
't' is appended to the mode argument), the contents of the file are
returned as strings, the bytes having been first decoded using a
platform-dependent encoding or using the specified encoding if given.
buffering is an optional integer used to set the buffering policy.
Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
line buffering (only usable in text mode), and an integer > 1 to indicate
the size of a fixed-size chunk buffer. When no buffering argument is
given, the default buffering policy works as follows:
* Binary files are buffered in fixed-size chunks; the size of the buffer
is chosen using a heuristic trying to determine the underlying device's
"block size" and falling back on `io.DEFAULT_BUFFER_SIZE`.
On many systems, the buffer will typically be 4096 or 8192 bytes long.
* "Interactive" text files (files for which isatty() returns True)
use line buffering. Other text files use the policy described above
for binary files.
encoding is the name of the encoding used to decode or encode the
file. This should only be used in text mode. The default encoding is
platform dependent, but any encoding supported by Python can be
passed. See the codecs module for the list of supported encodings.
errors is an optional string that specifies how encoding errors are to
be handled---this argument should not be used in binary mode. Pass
'strict' to raise a ValueError exception if there is an encoding error
(the default of None has the same effect), or pass 'ignore' to ignore
errors. (Note that ignoring encoding errors can lead to data loss.)
See the documentation for codecs.register or run 'help(codecs.Codec)'
for a list of the permitted encoding error strings.
newline controls how universal newlines works (it only applies to text
mode). It can be None, '', '\n', '\r', and '\r\n'. It works as
follows:
* On input, if newline is None, universal newlines mode is
enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
these are translated into '\n' before being returned to the
caller. If it is '', universal newline mode is enabled, but line
endings are returned to the caller untranslated. If it has any of
the other legal values, input lines are only terminated by the given
string, and the line ending is returned to the caller untranslated.
* On output, if newline is None, any '\n' characters written are
translated to the system default line separator, os.linesep. If
newline is '' or '\n', no translation takes place. If newline is any
of the other legal values, any '\n' characters written are translated
to the given string.
If closefd is False, the underlying file descriptor will be kept open
when the file is closed. This does not work when a file name is given
and must be True in that case.
A custom opener can be used by passing a callable as *opener*. The
underlying file descriptor for the file object is then obtained by
calling *opener* with (*file*, *flags*). *opener* must return an open
file descriptor (passing os.open as *opener* results in functionality
similar to passing None).
open() returns a file object whose type depends on the mode, and
through which the standard file operations such as reading and writing
are performed. When open() is used to open a file in a text mode ('w',
'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open
a file in a binary mode, the returned class varies: in read binary
mode, it returns a BufferedReader; in write binary and append binary
modes, it returns a BufferedWriter, and in read/write mode, it returns
a BufferedRandom.
It is also possible to use a string or bytearray as a file for both
reading and writing. For strings StringIO can be used like a file
opened in a text mode, and for bytes a BytesIO can be used like a file
opened in a binary mode.
ord(c, /)
Return the Unicode code point for a one-character string.
pow(base, exp, mod=None)
Equivalent to base**exp with 2 arguments or base**exp % mod with 3 arguments
Some types, such as ints, are able to use a more efficient algorithm when
invoked using the three argument form.
print(*args, sep=' ', end='\n', file=None, flush=False)
Prints the values to a stream, or to sys.stdout by default.
sep
string inserted between values, default a space.
end
string appended after the last value, default a newline.
file
a file-like object (stream); defaults to the current sys.stdout.
flush
whether to forcibly flush the stream.
repr(obj, /)
Return the canonical string representation of the object.
For many object types, including most builtins, eval(repr(obj)) == obj.
round(number, ndigits=None)
Round a number to a given precision in decimal digits.
The return value is an integer if ndigits is omitted or None. Otherwise
the return value has the same type as the number. ndigits may be negative.
setattr(obj, name, value, /)
Sets the named attribute on the given object to the specified value.
setattr(x, 'y', v) is equivalent to ``x.y = v``
sorted(iterable, /, *, key=None, reverse=False)
Return a new list containing all items from the iterable in ascending order.
A custom key function can be supplied to customize the sort order, and the
reverse flag can be set to request the result in descending order.
sum(iterable, /, start=0)
Return the sum of a 'start' value (default: 0) plus an iterable of numbers
When the iterable is empty, return the start value.
This function is intended specifically for use with numeric values and may
reject non-numeric types.
vars(...)
Show vars.
Without arguments, equivalent to locals().
With an argument, equivalent to object.__dict__.
DATA
Ellipsis = Ellipsis
False = False
None = None
NotImplemented = NotImplemented
True = True
__debug__ = True
copyright = Copyright (c) 2001-2023 Python Software Foundati...ematisc...
credits = Thanks to CWI, CNRI, BeOpen.com, Zope Corpor...opment. ...
exit = Use exit() or Ctrl-Z plus Return to exit
help = Type help() for interactive help, or help(object) for help abou...
license = Type license() to see the full license text
quit = Use quit() or Ctrl-Z plus Return to exit
FILE
(built-in)
ezdxf.InsertUnits
Python Library Documentation: class InsertUnits in module ezdxf.enums class InsertUnits(enum.IntEnum) | InsertUnits(*values) | | Method resolution order: | InsertUnits | enum.IntEnum | builtins.int | enum.ReprEnum | enum.Enum | builtins.object | | Methods defined here: | | __format__(self, format_spec, /) from builtins.int | Convert to a string according to format_spec. | | __new__(cls, value) from enum.Enum | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | Angstroms = <InsertUnits.Angstroms: 11> | | AstronomicalUnits = <InsertUnits.AstronomicalUnits: 18> | | Centimeters = <InsertUnits.Centimeters: 5> | | Decameters = <InsertUnits.Decameters: 15> | | Decimeters = <InsertUnits.Decimeters: 14> | | Feet = <InsertUnits.Feet: 2> | | Gigameters = <InsertUnits.Gigameters: 17> | | Hectometers = <InsertUnits.Hectometers: 16> | | Inches = <InsertUnits.Inches: 1> | | Kilometers = <InsertUnits.Kilometers: 7> | | Lightyears = <InsertUnits.Lightyears: 19> | | Meters = <InsertUnits.Meters: 6> | | Microinches = <InsertUnits.Microinches: 8> | | Microns = <InsertUnits.Microns: 13> | | Miles = <InsertUnits.Miles: 3> | | Millimeters = <InsertUnits.Millimeters: 4> | | Mils = <InsertUnits.Mils: 9> | | Nanometers = <InsertUnits.Nanometers: 12> | | Parsecs = <InsertUnits.Parsecs: 20> | | USSurveyFeet = <InsertUnits.USSurveyFeet: 21> | | USSurveyInch = <InsertUnits.USSurveyInch: 22> | | USSurveyMile = <InsertUnits.USSurveyMile: 24> | | USSurveyYard = <InsertUnits.USSurveyYard: 23> | | Unitless = <InsertUnits.Unitless: 0> | | Yards = <InsertUnits.Yards: 10> | | ---------------------------------------------------------------------- | Methods inherited from enum.IntEnum: | | __repr__(self) from enum.Enum | Return repr(self). | | __str__ = __repr__(self, /) from builtins.int | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __and__(self, value, /) | Return self&value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __invert__(self, /) | ~self | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __or__(self, value, /) | Return self|value. | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rand__(self, value, /) | Return value&self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __ror__(self, value, /) | Return value|self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | __xor__(self, value, /) | Return self^value. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number | | ---------------------------------------------------------------------- | Methods inherited from enum.Enum: | | __dir__(self) | Returns public methods and other interesting attributes. | | __init__(self, *args, **kwds) | Initialize self. See help(type(self)) for accurate signature. | | __reduce_ex__(self, proto) | Helper for pickle. | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Static methods inherited from enum.EnumType: | | __contains__(value) | Return True if `value` is in `cls`. | | `value` is in `cls` if: | 1) `value` is a member of `cls`, or | 2) `value` is the value of one of the `cls`'s members. | | __getitem__(name) | Return the member matching `name`. | | __iter__() | Return members in definition order. | | __len__() | Return the number of members (no aliases) | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumType: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping.
ezdxf.InvalidGeoDataException
Python Library Documentation: class InvalidGeoDataException in module ezdxf.lldxf.const class InvalidGeoDataException(DXFError) | Method resolution order: | InvalidGeoDataException | DXFError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from DXFError: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
ezdxf.Optional
Python Library Documentation: _SpecialForm in module typing
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
ezdxf.PYPY
Python Library Documentation: bool object class bool(int) | bool(x) -> bool | | Returns True when the argument x is true, False otherwise. | The builtins True and False are the only two instances of the class bool. | The class bool is a subclass of the class int, and cannot be subclassed. | | Method resolution order: | bool | int | object | | Methods defined here: | | __and__(self, value, /) | Return self&value. | | __invert__(self, /) | ~self | | __or__(self, value, /) | Return self|value. | | __rand__(self, value, /) | Return value&self. | | __repr__(self, /) | Return repr(self). | | __ror__(self, value, /) | Return value|self. | | __rxor__(self, value, /) | Return value^self. | | __xor__(self, value, /) | Return self^value. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __format__(self, format_spec, /) | Convert to a string according to format_spec. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number
ezdxf.PYPY_ON_WINDOWS
Python Library Documentation: bool object class bool(int) | bool(x) -> bool | | Returns True when the argument x is true, False otherwise. | The builtins True and False are the only two instances of the class bool. | The class bool is a subclass of the class int, and cannot be subclassed. | | Method resolution order: | bool | int | object | | Methods defined here: | | __and__(self, value, /) | Return self&value. | | __invert__(self, /) | ~self | | __or__(self, value, /) | Return self|value. | | __rand__(self, value, /) | Return value&self. | | __repr__(self, /) | Return repr(self). | | __ror__(self, value, /) | Return value|self. | | __rxor__(self, value, /) | Return value^self. | | __xor__(self, value, /) | Return self^value. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __format__(self, format_spec, /) | Convert to a string according to format_spec. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number
ezdxf.TRUE_STATE
Python Library Documentation: set object class set(object) | set() -> new empty set object | set(iterable) -> new set object | | Build an unordered collection of unique elements. | | Methods defined here: | | __and__(self, value, /) | Return self&value. | | __contains__(...) | x.__contains__(y) <==> y in x. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __gt__(self, value, /) | Return self>value. | | __iand__(self, value, /) | Return self&=value. | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __ior__(self, value, /) | Return self|=value. | | __isub__(self, value, /) | Return self-=value. | | __iter__(self, /) | Implement iter(self). | | __ixor__(self, value, /) | Return self^=value. | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __or__(self, value, /) | Return self|value. | | __rand__(self, value, /) | Return value&self. | | __reduce__(...) | Return state information for pickling. | | __repr__(self, /) | Return repr(self). | | __ror__(self, value, /) | Return value|self. | | __rsub__(self, value, /) | Return value-self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(...) | S.__sizeof__() -> size of S in memory, in bytes | | __sub__(self, value, /) | Return self-value. | | __xor__(self, value, /) | Return self^value. | | add(...) | Add an element to a set. | | This has no effect if the element is already present. | | clear(...) | Remove all elements from this set. | | copy(...) | Return a shallow copy of a set. | | difference(...) | Return the difference of two or more sets as a new set. | | (i.e. all elements that are in this set but not the others.) | | difference_update(...) | Remove all elements of another set from this set. | | discard(...) | Remove an element from a set if it is a member. | | Unlike set.remove(), the discard() method does not raise | an exception when an element is missing from the set. | | intersection(...) | Return the intersection of two sets as a new set. | | (i.e. all elements that are in both sets.) | | intersection_update(...) | Update a set with the intersection of itself and another. | | isdisjoint(...) | Return True if two sets have a null intersection. | | issubset(self, other, /) | Test whether every element in the set is in other. | | issuperset(self, other, /) | Test whether every element in other is in the set. | | pop(...) | Remove and return an arbitrary set element. | Raises KeyError if the set is empty. | | remove(...) | Remove an element from a set; it must be a member. | | If the element is not a member, raise a KeyError. | | symmetric_difference(...) | Return the symmetric difference of two sets as a new set. | | (i.e. all elements that are in exactly one of the sets.) | | symmetric_difference_update(...) | Update a set with the symmetric difference of itself and another. | | union(...) | Return the union of sets as a new set. | | (i.e. all elements that are in either set.) | | update(...) | Update a set with the union of itself and others. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None
ezdxf.TextIO
Python Library Documentation: class TextIO in module typing class TextIO(IO) | Typed version of the return of open() in text mode. | | Method resolution order: | TextIO | IO | Generic | builtins.object | | Methods defined here: | | __enter__(self) -> 'TextIO' | | ---------------------------------------------------------------------- | Readonly properties defined here: | | buffer | | encoding | | errors | | line_buffering | | newlines | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __orig_bases__ = (typing.IO[str],) | | __parameters__ = () | | ---------------------------------------------------------------------- | Methods inherited from IO: | | __exit__(self, type, value, traceback) -> None | | close(self) -> None | | fileno(self) -> int | | flush(self) -> None | | isatty(self) -> bool | | read(self, n: int = -1) -> ~AnyStr | | readable(self) -> bool | | readline(self, limit: int = -1) -> ~AnyStr | | readlines(self, hint: int = -1) -> List[~AnyStr] | | seek(self, offset: int, whence: int = 0) -> int | | seekable(self) -> bool | | tell(self) -> int | | truncate(self, size: int = None) -> int | | writable(self) -> bool | | write(self, s: ~AnyStr) -> int | | writelines(self, lines: List[~AnyStr]) -> None | | ---------------------------------------------------------------------- | Readonly properties inherited from IO: | | closed | | mode | | name | | ---------------------------------------------------------------------- | Class methods inherited from Generic: | | __class_getitem__(...) | Parameterizes a generic class. | | At least, parameterizing a generic class is the *main* thing this | method does. For example, for some generic class `Foo`, this is called | when we do `Foo[int]` - there, with `cls=Foo` and `params=int`. | | However, note that this method is also called when defining generic | classes in the first place with `class Foo[T]: ...`. | | __init_subclass__(...) | Function to initialize subclasses.
ezdxf.VERSION
Error rendering doc: No Python documentation found for '1.4.4'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
ezdxf.YES_NO
Python Library Documentation: dict object
class dict(object)
| dict() -> new empty dictionary
| dict(mapping) -> new dictionary initialized from a mapping object's
| (key, value) pairs
| dict(iterable) -> new dictionary initialized as if via:
| d = {}
| for k, v in iterable:
| d[k] = v
| dict(**kwargs) -> new dictionary initialized with the name=value pairs
| in the keyword argument list. For example: dict(one=1, two=2)
|
| Built-in subclasses:
| StgDict
|
| Methods defined here:
|
| __contains__(self, key, /)
| True if the dictionary has the specified key, else False.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __ior__(self, value, /)
| Return self|=value.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __or__(self, value, /)
| Return self|value.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(self, /)
| Return a reverse iterator over the dict keys.
|
| __ror__(self, value, /)
| Return value|self.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(self, key, default=None, /)
| Return the value for key if key is in the dictionary, else default.
|
| items(...)
| D.items() -> a set-like object providing a view on D's items
|
| keys(...)
| D.keys() -> a set-like object providing a view on D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
|
| If the key is not found, return the default if given; otherwise,
| raise a KeyError.
|
| popitem(self, /)
| Remove and return a (key, value) pair as a 2-tuple.
|
| Pairs are returned in LIFO (last-in, first-out) order.
| Raises KeyError if the dict is empty.
|
| setdefault(self, key, default=None, /)
| Insert key with a value of default if key is not in the dictionary.
|
| Return the value for key if key is in the dictionary, else default.
|
| update(...)
| D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
| If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
| If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
| In either case, this is followed by: for k in F: D[k] = F[k]
|
| values(...)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| fromkeys(iterable, value=None, /)
| Create a new dictionary with keys from iterable and values set to value.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None
ezdxf.acc
Python Library Documentation: package ezdxf.acc in ezdxf
NAME
ezdxf.acc
DESCRIPTION
# Copyright (c) 2020-2024, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
bezier3p
bezier4p
bspline
construct
linetypes
mapbox_earcut
matrix44
np_support
vector
DATA
PYPY = False
USE_C_EXT = True
options = <ezdxf._options.Options object>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\acc\__init__.py
ezdxf.audit
Python Library Documentation: module ezdxf.audit in ezdxf
NAME
ezdxf.audit
DESCRIPTION
# Copyright (c) 2017-2023, Manfred Moitzi
# License: MIT License
CLASSES
builtins.object
Auditor
BlockCycleDetector
enum.IntEnum(builtins.int, enum.ReprEnum)
AuditError
class AuditError(enum.IntEnum)
| AuditError(*values)
|
| Method resolution order:
| AuditError
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ACTIVE_PAPERSPACE_LAYOUT_NOT_FOUND = <AuditError.ACTIVE_PAPERSPACE_LAY...
|
| BLOCK_NAME_MISMATCH = <AuditError.BLOCK_NAME_MISMATCH: 119>
|
| CREATED_MISSING_OBJECT = <AuditError.CREATED_MISSING_OBJECT: 112>
|
| DECODING_ERROR = <AuditError.DECODING_ERROR: 111>
|
| DUPLICATE_TABLE_ENTRY_NAME = <AuditError.DUPLICATE_TABLE_ENTRY_NAME: 2...
|
| FOUND_TAG_OUTSIDE_SECTION = <AuditError.FOUND_TAG_OUTSIDE_SECTION: 8>
|
| GROUP_ENTITIES_IN_DIFFERENT_LAYOUTS = <AuditError.GROUP_ENTITIES_IN_DI...
|
| INVALID_BLOCK_REFERENCE_CYCLE = <AuditError.INVALID_BLOCK_REFERENCE_CY...
|
| INVALID_CHARACTER = <AuditError.INVALID_CHARACTER: 214>
|
| INVALID_COLOR_INDEX = <AuditError.INVALID_COLOR_INDEX: 204>
|
| INVALID_CREASE_VALUE_COUNT = <AuditError.INVALID_CREASE_VALUE_COUNT: 2...
|
| INVALID_DICTIONARY_ENTRY = <AuditError.INVALID_DICTIONARY_ENTRY: 213>
|
| INVALID_DIMENSION_GEOMETRY_LOCATION = <AuditError.INVALID_DIMENSION_GE...
|
| INVALID_DIMSTYLE = <AuditError.INVALID_DIMSTYLE: 207>
|
| INVALID_ELLIPSE_RATIO = <AuditError.INVALID_ELLIPSE_RATIO: 225>
|
| INVALID_ENTITY_HANDLE = <AuditError.INVALID_ENTITY_HANDLE: 201>
|
| INVALID_EXTRUSION_VECTOR = <AuditError.INVALID_EXTRUSION_VECTOR: 210>
|
| INVALID_FLOATING_POINT_VALUE = <AuditError.INVALID_FLOATING_POINT_VALU...
|
| INVALID_GROUP_ENTITIES = <AuditError.INVALID_GROUP_ENTITIES: 114>
|
| INVALID_HATCH_BOUNDARY_PATH = <AuditError.INVALID_HATCH_BOUNDARY_PATH:...
|
| INVALID_INTEGER_VALUE = <AuditError.INVALID_INTEGER_VALUE: 116>
|
| INVALID_LAYER_NAME = <AuditError.INVALID_LAYER_NAME: 203>
|
| INVALID_LINEWEIGHT = <AuditError.INVALID_LINEWEIGHT: 205>
|
| INVALID_MAJOR_AXIS = <AuditError.INVALID_MAJOR_AXIS: 211>
|
| INVALID_MESH_DATA = <AuditError.INVALID_MESH_DATA: 228>
|
| INVALID_MLINESTYLE_ELEMENT_COUNT = <AuditError.INVALID_MLINESTYLE_ELEM...
|
| INVALID_MLINESTYLE_HANDLE = <AuditError.INVALID_MLINESTYLE_HANDLE: 206...
|
| INVALID_MLINE_VERTEX = <AuditError.INVALID_MLINE_VERTEX: 215>
|
| INVALID_OWNER_HANDLE = <AuditError.INVALID_OWNER_HANDLE: 202>
|
| INVALID_SPLINE_CONTROL_POINT_COUNT = <AuditError.INVALID_SPLINE_CONTRO...
|
| INVALID_SPLINE_DEFINITION = <AuditError.INVALID_SPLINE_DEFINITION: 217...
|
| INVALID_SPLINE_FIT_POINT_COUNT = <AuditError.INVALID_SPLINE_FIT_POINT_...
|
| INVALID_SPLINE_KNOT_VALUE_COUNT = <AuditError.INVALID_SPLINE_KNOT_VALU...
|
| INVALID_SPLINE_WEIGHT_COUNT = <AuditError.INVALID_SPLINE_WEIGHT_COUNT:...
|
| INVALID_TABLE_HANDLE = <AuditError.INVALID_TABLE_HANDLE: 110>
|
| INVALID_TRANSPARENCY = <AuditError.INVALID_TRANSPARENCY: 223>
|
| INVALID_VERTEX_COUNT = <AuditError.INVALID_VERTEX_COUNT: 212>
|
| MISPLACED_ROOT_DICT = <AuditError.MISPLACED_ROOT_DICT: 14>
|
| MISSING_ENDSEC_TAG = <AuditError.MISSING_ENDSEC_TAG: 7>
|
| MISSING_PERSISTENT_REACTOR = <AuditError.MISSING_PERSISTENT_REACTOR: 1...
|
| MISSING_REQUIRED_ROOT_DICT_ENTRY = <AuditError.MISSING_REQUIRED_ROOT_D...
|
| MISSING_REQUIRED_SEQEND = <AuditError.MISSING_REQUIRED_SEQEND: 107>
|
| MISSING_SECTION_NAME_TAG = <AuditError.MISSING_SECTION_NAME_TAG: 6>
|
| MISSING_SECTION_TAG = <AuditError.MISSING_SECTION_TAG: 5>
|
| MODELSPACE_NOT_FOUND = <AuditError.MODELSPACE_NOT_FOUND: 17>
|
| ORPHANED_LAYOUT_ENTITY = <AuditError.ORPHANED_LAYOUT_ENTITY: 108>
|
| ORPHANED_PAPER_SPACE_BLOCK_RECORD_ENTITY = <AuditError.ORPHANED_PAPER_...
|
| POINTER_TARGET_NOT_EXIST = <AuditError.POINTER_TARGET_NOT_EXIST: 3>
|
| REMOVED_ENTITY_WITH_INVALID_OWNER_HANDLE = <AuditError.REMOVED_ENTITY_...
|
| REMOVED_INVALID_DXF_OBJECT = <AuditError.REMOVED_INVALID_DXF_OBJECT: 1...
|
| REMOVED_INVALID_GRAPHIC_ENTITY = <AuditError.REMOVED_INVALID_GRAPHIC_E...
|
| REMOVED_STANDALONE_ATTRIB_ENTITY = <AuditError.REMOVED_STANDALONE_ATTR...
|
| REMOVED_UNSUPPORTED_SECTION = <AuditError.REMOVED_UNSUPPORTED_SECTION:...
|
| REMOVED_UNSUPPORTED_TABLE = <AuditError.REMOVED_UNSUPPORTED_TABLE: 10>
|
| REMOVE_EMPTY_GROUP = <AuditError.REMOVE_EMPTY_GROUP: 105>
|
| RESET_MLINE_STYLE = <AuditError.RESET_MLINE_STYLE: 113>
|
| ROOT_DICT_NOT_FOUND = <AuditError.ROOT_DICT_NOT_FOUND: 15>
|
| TABLE_NOT_FOUND = <AuditError.TABLE_NOT_FOUND: 4>
|
| TAG_ATTRIBUTE_MISSING = <AuditError.TAG_ATTRIBUTE_MISSING: 227>
|
| UNDEFINED_BLOCK = <AuditError.UNDEFINED_BLOCK: 103>
|
| UNDEFINED_BLOCK_NAME = <AuditError.UNDEFINED_BLOCK_NAME: 115>
|
| UNDEFINED_DIMENSION_STYLE = <AuditError.UNDEFINED_DIMENSION_STYLE: 101...
|
| UNDEFINED_LINETYPE = <AuditError.UNDEFINED_LINETYPE: 100>
|
| UNDEFINED_TEXT_STYLE = <AuditError.UNDEFINED_TEXT_STYLE: 102>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class Auditor(builtins.object)
| Auditor(doc: 'Drawing') -> 'None'
|
| Methods defined here:
|
| __bool__(self) -> 'bool'
| Returns ``True`` if any unfixed errors exist.
|
| __init__(self, doc: 'Drawing') -> 'None'
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self) -> 'Iterable[ErrorEntry]'
| Iterate over all unfixed errors.
|
| __len__(self) -> 'int'
| Returns count of unfixed errors.
|
| add_error(self, code: 'int', message: 'str' = '', dxf_entity: 'Optional[DXFEntity]' = None, data: 'Any' = None) -> 'None'
|
| add_post_audit_job(self, job: 'Callable')
|
| audit_all_database_entities(self) -> 'None'
| Audit all entities stored in the entity database.
|
| check_active_layout_exist(self) -> 'None'
|
| check_block_reference_cycles(self) -> 'None'
|
| check_dimension_style(self, entity: 'DXFGraphic') -> 'None'
| Check for usage of undefined dimension styles.
|
| check_entity_color_index(self, entity: 'DXFGraphic') -> 'None'
|
| check_entity_linetype(self, entity: 'DXFEntity') -> 'None'
| Check for usage of undefined line types. AutoCAD does not load
| DXF files with undefined line types.
|
| check_entity_lineweight(self, entity: 'DXFGraphic') -> 'None'
|
| check_extrusion_vector(self, entity: 'DXFEntity') -> 'None'
|
| check_for_valid_layer_name(self, entity: 'DXFEntity') -> 'None'
| Check layer names for invalid characters: <>/":;?*|='
|
| check_modelspace_exist(self) -> 'None'
|
| check_owner_exist(self, entity: 'DXFEntity') -> 'None'
|
| check_root_dict(self) -> 'bool'
|
| check_root_dict_entries(self) -> 'None'
|
| check_tables(self) -> 'None'
|
| check_text_style(self, entity: 'DXFEntity') -> 'None'
| Check for usage of undefined text styles.
|
| check_transparency(self, entity: 'DXFEntity') -> 'None'
|
| empty_trashcan(self)
|
| exec_post_audit_jobs(self)
|
| fixed_error(self, code: 'int', message: 'str' = '', dxf_entity: 'Optional[DXFEntity]' = None, data: 'Any' = None) -> 'None'
|
| print_error_report(self, errors: 'Optional[list[ErrorEntry]]' = None, stream: 'Optional[TextIO]' = None) -> 'None'
|
| print_fixed_errors(self, stream: 'Optional[TextIO]' = None) -> 'None'
|
| purge(self, codes: 'set[int]')
| Remove error messages defined by integer error `codes`.
|
| This is useful to remove errors which are not important for a specific
| file usage.
|
| reset(self) -> 'None'
|
| run(self) -> 'list[ErrorEntry]'
|
| trash(self, entity: 'DXFEntity') -> 'None'
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| entitydb
|
| has_errors
| Returns ``True`` if any unrecoverable errors were detected.
|
| has_fixes
| Returns ``True`` if any recoverable errors were fixed while auditing.
|
| has_issues
| Returns ``True`` if the DXF document has any errors or fixes.
|
| has_trashcan
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class BlockCycleDetector(builtins.object)
| BlockCycleDetector(doc: 'Drawing')
|
| Methods defined here:
|
| __init__(self, doc: 'Drawing')
| Initialize self. See help(type(self)) for accurate signature.
|
| has_cycle(self, block_name: 'str') -> 'bool'
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
FUNCTIONS
audit(entity: 'DXFEntity', doc: 'Drawing') -> 'Auditor'
Setup an :class:`Auditor` object, run the audit process for `entity`
and return result as :class:`Auditor` object.
Args:
entity: DXF entity to validate
doc: bounded DXF document of `entity`
DATA
__all__ = ['Auditor', 'AuditError', 'audit', 'BlockCycleDetector']
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\audit.py
ezdxf.codecs
Python Library Documentation: module codecs
NAME
codecs - codecs -- Python Codec Registry, API and helpers.
MODULE REFERENCE
https://docs.python.org/3.12/library/codecs.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
CLASSES
builtins.object
Codec
StreamReader
StreamWriter
IncrementalDecoder
IncrementalEncoder
StreamReaderWriter
StreamRecoder
builtins.tuple(builtins.object)
CodecInfo
class Codec(builtins.object)
| Defines the interface for stateless encoders/decoders.
|
| The .encode()/.decode() methods may use different error
| handling schemes by providing the errors argument. These
| string values are predefined:
|
| 'strict' - raise a ValueError error (or a subclass)
| 'ignore' - ignore the character and continue with the next
| 'replace' - replace with a suitable replacement character;
| Python will use the official U+FFFD REPLACEMENT
| CHARACTER for the builtin Unicode codecs on
| decoding and '?' on encoding.
| 'surrogateescape' - replace with private code points U+DCnn.
| 'xmlcharrefreplace' - Replace with the appropriate XML
| character reference (only for encoding).
| 'backslashreplace' - Replace with backslashed escape sequences.
| 'namereplace' - Replace with \N{...} escape sequences
| (only for encoding).
|
| The set of allowed values can be extended via register_error.
|
| Methods defined here:
|
| decode(self, input, errors='strict')
| Decodes the object input and returns a tuple (output
| object, length consumed).
|
| input must be an object which provides the bf_getreadbuf
| buffer slot. Python strings, buffer objects and memory
| mapped files are examples of objects providing this slot.
|
| errors defines the error handling to apply. It defaults to
| 'strict' handling.
|
| The method may not store state in the Codec instance. Use
| StreamReader for codecs which have to keep state in order to
| make decoding efficient.
|
| The decoder must be able to handle zero length input and
| return an empty object of the output object type in this
| situation.
|
| encode(self, input, errors='strict')
| Encodes the object input and returns a tuple (output
| object, length consumed).
|
| errors defines the error handling to apply. It defaults to
| 'strict' handling.
|
| The method may not store state in the Codec instance. Use
| StreamWriter for codecs which have to keep state in order to
| make encoding efficient.
|
| The encoder must be able to handle zero length input and
| return an empty object of the output object type in this
| situation.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class CodecInfo(builtins.tuple)
| CodecInfo(encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None, *, _is_text_encoding=None)
|
| Codec details when looking up the codec registry
|
| Method resolution order:
| CodecInfo
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __repr__(self)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(cls, encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None, *, _is_text_encoding=None)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class IncrementalDecoder(builtins.object)
| IncrementalDecoder(errors='strict')
|
| An IncrementalDecoder decodes an input in multiple steps. The input can
| be passed piece by piece to the decode() method. The IncrementalDecoder
| remembers the state of the decoding process between calls to decode().
|
| Methods defined here:
|
| __init__(self, errors='strict')
| Create an IncrementalDecoder instance.
|
| The IncrementalDecoder may use different error handling schemes by
| providing the errors keyword argument. See the module docstring
| for a list of possible values.
|
| decode(self, input, final=False)
| Decode input and returns the resulting object.
|
| getstate(self)
| Return the current state of the decoder.
|
| This must be a (buffered_input, additional_state_info) tuple.
| buffered_input must be a bytes object containing bytes that
| were passed to decode() that have not yet been converted.
| additional_state_info must be a non-negative integer
| representing the state of the decoder WITHOUT yet having
| processed the contents of buffered_input. In the initial state
| and after reset(), getstate() must return (b"", 0).
|
| reset(self)
| Reset the decoder to the initial state.
|
| setstate(self, state)
| Set the current state of the decoder.
|
| state must have been returned by getstate(). The effect of
| setstate((b"", 0)) must be equivalent to reset().
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class IncrementalEncoder(builtins.object)
| IncrementalEncoder(errors='strict')
|
| An IncrementalEncoder encodes an input in multiple steps. The input can
| be passed piece by piece to the encode() method. The IncrementalEncoder
| remembers the state of the encoding process between calls to encode().
|
| Methods defined here:
|
| __init__(self, errors='strict')
| Creates an IncrementalEncoder instance.
|
| The IncrementalEncoder may use different error handling schemes by
| providing the errors keyword argument. See the module docstring
| for a list of possible values.
|
| encode(self, input, final=False)
| Encodes input and returns the resulting object.
|
| getstate(self)
| Return the current state of the encoder.
|
| reset(self)
| Resets the encoder to the initial state.
|
| setstate(self, state)
| Set the current state of the encoder. state must have been
| returned by getstate().
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class StreamReader(Codec)
| StreamReader(stream, errors='strict')
|
| Method resolution order:
| StreamReader
| Codec
| builtins.object
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, type, value, tb)
|
| __getattr__(self, name, getattr=<built-in function getattr>)
| Inherit all other methods from the underlying stream.
|
| __init__(self, stream, errors='strict')
| Creates a StreamReader instance.
|
| stream must be a file-like object open for reading.
|
| The StreamReader may use different error handling
| schemes by providing the errors keyword argument. These
| parameters are predefined:
|
| 'strict' - raise a ValueError (or a subclass)
| 'ignore' - ignore the character and continue with the next
| 'replace'- replace with a suitable replacement character
| 'backslashreplace' - Replace with backslashed escape sequences;
|
| The set of allowed parameter values can be extended via
| register_error.
|
| __iter__(self)
|
| __next__(self)
| Return the next decoded line from the input stream.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| decode(self, input, errors='strict')
| Decodes the object input and returns a tuple (output
| object, length consumed).
|
| input must be an object which provides the bf_getreadbuf
| buffer slot. Python strings, buffer objects and memory
| mapped files are examples of objects providing this slot.
|
| errors defines the error handling to apply. It defaults to
| 'strict' handling.
|
| The method may not store state in the Codec instance. Use
| StreamReader for codecs which have to keep state in order to
| make decoding efficient.
|
| The decoder must be able to handle zero length input and
| return an empty object of the output object type in this
| situation.
|
| read(self, size=-1, chars=-1, firstline=False)
| Decodes data from the stream self.stream and returns the
| resulting object.
|
| chars indicates the number of decoded code points or bytes to
| return. read() will never return more data than requested,
| but it might return less, if there is not enough available.
|
| size indicates the approximate maximum number of decoded
| bytes or code points to read for decoding. The decoder
| can modify this setting as appropriate. The default value
| -1 indicates to read and decode as much as possible. size
| is intended to prevent having to decode huge files in one
| step.
|
| If firstline is true, and a UnicodeDecodeError happens
| after the first line terminator in the input only the first line
| will be returned, the rest of the input will be kept until the
| next call to read().
|
| The method should use a greedy read strategy, meaning that
| it should read as much data as is allowed within the
| definition of the encoding and the given size, e.g. if
| optional encoding endings or state markers are available
| on the stream, these should be read too.
|
| readline(self, size=None, keepends=True)
| Read one line from the input stream and return the
| decoded data.
|
| size, if given, is passed as size argument to the
| read() method.
|
| readlines(self, sizehint=None, keepends=True)
| Read all lines available on the input stream
| and return them as a list.
|
| Line breaks are implemented using the codec's decoder
| method and are included in the list entries.
|
| sizehint, if given, is ignored since there is no efficient
| way to finding the true end-of-line.
|
| reset(self)
| Resets the codec buffers used for keeping internal state.
|
| Note that no stream repositioning should take place.
| This method is primarily intended to be able to recover
| from decoding errors.
|
| seek(self, offset, whence=0)
| Set the input stream's current position.
|
| Resets the codec buffers used for keeping state.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| charbuffertype = <class 'str'>
| str(object='') -> str
| str(bytes_or_buffer[, encoding[, errors]]) -> str
|
| Create a new string object from the given object. If encoding or
| errors is specified, then the object must expose a data buffer
| that will be decoded using the given encoding and error handler.
| Otherwise, returns the result of object.__str__() (if defined)
| or repr(object).
| encoding defaults to sys.getdefaultencoding().
| errors defaults to 'strict'.
|
|
| ----------------------------------------------------------------------
| Methods inherited from Codec:
|
| encode(self, input, errors='strict')
| Encodes the object input and returns a tuple (output
| object, length consumed).
|
| errors defines the error handling to apply. It defaults to
| 'strict' handling.
|
| The method may not store state in the Codec instance. Use
| StreamWriter for codecs which have to keep state in order to
| make encoding efficient.
|
| The encoder must be able to handle zero length input and
| return an empty object of the output object type in this
| situation.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from Codec:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class StreamReaderWriter(builtins.object)
| StreamReaderWriter(stream, Reader, Writer, errors='strict')
|
| StreamReaderWriter instances allow wrapping streams which
| work in both read and write modes.
|
| The design is such that one can use the factory functions
| returned by the codec.lookup() function to construct the
| instance.
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, type, value, tb)
|
| __getattr__(self, name, getattr=<built-in function getattr>)
| Inherit all other methods from the underlying stream.
|
| __init__(self, stream, Reader, Writer, errors='strict')
| Creates a StreamReaderWriter instance.
|
| stream must be a Stream-like object.
|
| Reader, Writer must be factory functions or classes
| providing the StreamReader, StreamWriter interface resp.
|
| Error handling is done in the same way as defined for the
| StreamWriter/Readers.
|
| __iter__(self)
|
| __next__(self)
| Return the next decoded line from the input stream.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| read(self, size=-1)
|
| readline(self, size=None)
|
| readlines(self, sizehint=None)
|
| reset(self)
|
| seek(self, offset, whence=0)
|
| write(self, data)
|
| writelines(self, list)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| encoding = 'unknown'
class StreamRecoder(builtins.object)
| StreamRecoder(stream, encode, decode, Reader, Writer, errors='strict')
|
| StreamRecoder instances translate data from one encoding to another.
|
| They use the complete set of APIs returned by the
| codecs.lookup() function to implement their task.
|
| Data written to the StreamRecoder is first decoded into an
| intermediate format (depending on the "decode" codec) and then
| written to the underlying stream using an instance of the provided
| Writer class.
|
| In the other direction, data is read from the underlying stream using
| a Reader instance and then encoded and returned to the caller.
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, type, value, tb)
|
| __getattr__(self, name, getattr=<built-in function getattr>)
| Inherit all other methods from the underlying stream.
|
| __init__(self, stream, encode, decode, Reader, Writer, errors='strict')
| Creates a StreamRecoder instance which implements a two-way
| conversion: encode and decode work on the frontend (the
| data visible to .read() and .write()) while Reader and Writer
| work on the backend (the data in stream).
|
| You can use these objects to do transparent
| transcodings from e.g. latin-1 to utf-8 and back.
|
| stream must be a file-like object.
|
| encode and decode must adhere to the Codec interface; Reader and
| Writer must be factory functions or classes providing the
| StreamReader and StreamWriter interfaces resp.
|
| Error handling is done in the same way as defined for the
| StreamWriter/Readers.
|
| __iter__(self)
|
| __next__(self)
| Return the next decoded line from the input stream.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| read(self, size=-1)
|
| readline(self, size=None)
|
| readlines(self, sizehint=None)
|
| reset(self)
|
| seek(self, offset, whence=0)
|
| write(self, data)
|
| writelines(self, list)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| data_encoding = 'unknown'
|
| file_encoding = 'unknown'
class StreamWriter(Codec)
| StreamWriter(stream, errors='strict')
|
| Method resolution order:
| StreamWriter
| Codec
| builtins.object
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, type, value, tb)
|
| __getattr__(self, name, getattr=<built-in function getattr>)
| Inherit all other methods from the underlying stream.
|
| __init__(self, stream, errors='strict')
| Creates a StreamWriter instance.
|
| stream must be a file-like object open for writing.
|
| The StreamWriter may use different error handling
| schemes by providing the errors keyword argument. These
| parameters are predefined:
|
| 'strict' - raise a ValueError (or a subclass)
| 'ignore' - ignore the character and continue with the next
| 'replace'- replace with a suitable replacement character
| 'xmlcharrefreplace' - Replace with the appropriate XML
| character reference.
| 'backslashreplace' - Replace with backslashed escape
| sequences.
| 'namereplace' - Replace with \N{...} escape sequences.
|
| The set of allowed parameter values can be extended via
| register_error.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| reset(self)
| Resets the codec buffers used for keeping internal state.
|
| Calling this method should ensure that the data on the
| output is put into a clean state, that allows appending
| of new fresh data without having to rescan the whole
| stream to recover state.
|
| seek(self, offset, whence=0)
|
| write(self, object)
| Writes the object's contents encoded to self.stream.
|
| writelines(self, list)
| Writes the concatenated list of strings to the stream
| using .write().
|
| ----------------------------------------------------------------------
| Methods inherited from Codec:
|
| decode(self, input, errors='strict')
| Decodes the object input and returns a tuple (output
| object, length consumed).
|
| input must be an object which provides the bf_getreadbuf
| buffer slot. Python strings, buffer objects and memory
| mapped files are examples of objects providing this slot.
|
| errors defines the error handling to apply. It defaults to
| 'strict' handling.
|
| The method may not store state in the Codec instance. Use
| StreamReader for codecs which have to keep state in order to
| make decoding efficient.
|
| The decoder must be able to handle zero length input and
| return an empty object of the output object type in this
| situation.
|
| encode(self, input, errors='strict')
| Encodes the object input and returns a tuple (output
| object, length consumed).
|
| errors defines the error handling to apply. It defaults to
| 'strict' handling.
|
| The method may not store state in the Codec instance. Use
| StreamWriter for codecs which have to keep state in order to
| make encoding efficient.
|
| The encoder must be able to handle zero length input and
| return an empty object of the output object type in this
| situation.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from Codec:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
FUNCTIONS
EncodedFile(file, data_encoding, file_encoding=None, errors='strict')
Return a wrapped version of file which provides transparent
encoding translation.
Data written to the wrapped file is decoded according
to the given data_encoding and then encoded to the underlying
file using file_encoding. The intermediate data type
will usually be Unicode but depends on the specified codecs.
Bytes read from the file are decoded using file_encoding and then
passed back to the caller encoded using data_encoding.
If file_encoding is not given, it defaults to data_encoding.
errors may be given to define the error handling. It defaults
to 'strict' which causes ValueErrors to be raised in case an
encoding error occurs.
The returned wrapped file object provides two extra attributes
.data_encoding and .file_encoding which reflect the given
parameters of the same name. The attributes can be used for
introspection by Python programs.
backslashreplace_errors(...)
Implements the 'backslashreplace' error handling, which replaces malformed data with a backslashed escape sequence.
decode(obj, encoding='utf-8', errors='strict')
Decodes obj using the codec registered for encoding.
Default encoding is 'utf-8'. errors may be given to set a
different error handling scheme. Default is 'strict' meaning that encoding
errors raise a ValueError. Other possible values are 'ignore', 'replace'
and 'backslashreplace' as well as any other name registered with
codecs.register_error that can handle ValueErrors.
encode(obj, encoding='utf-8', errors='strict')
Encodes obj using the codec registered for encoding.
The default encoding is 'utf-8'. errors may be given to set a
different error handling scheme. Default is 'strict' meaning that encoding
errors raise a ValueError. Other possible values are 'ignore', 'replace'
and 'backslashreplace' as well as any other name registered with
codecs.register_error that can handle ValueErrors.
getdecoder(encoding)
Lookup up the codec for the given encoding and return
its decoder function.
Raises a LookupError in case the encoding cannot be found.
getencoder(encoding)
Lookup up the codec for the given encoding and return
its encoder function.
Raises a LookupError in case the encoding cannot be found.
getincrementaldecoder(encoding)
Lookup up the codec for the given encoding and return
its IncrementalDecoder class or factory function.
Raises a LookupError in case the encoding cannot be found
or the codecs doesn't provide an incremental decoder.
getincrementalencoder(encoding)
Lookup up the codec for the given encoding and return
its IncrementalEncoder class or factory function.
Raises a LookupError in case the encoding cannot be found
or the codecs doesn't provide an incremental encoder.
getreader(encoding)
Lookup up the codec for the given encoding and return
its StreamReader class or factory function.
Raises a LookupError in case the encoding cannot be found.
getwriter(encoding)
Lookup up the codec for the given encoding and return
its StreamWriter class or factory function.
Raises a LookupError in case the encoding cannot be found.
ignore_errors(...)
Implements the 'ignore' error handling, which ignores malformed data and continues.
iterdecode(iterator, encoding, errors='strict', **kwargs)
Decoding iterator.
Decodes the input strings from the iterator using an IncrementalDecoder.
errors and kwargs are passed through to the IncrementalDecoder
constructor.
iterencode(iterator, encoding, errors='strict', **kwargs)
Encoding iterator.
Encodes the input strings from the iterator using an IncrementalEncoder.
errors and kwargs are passed through to the IncrementalEncoder
constructor.
lookup(encoding, /)
Looks up a codec tuple in the Python codec registry and returns a CodecInfo object.
lookup_error(name, /)
lookup_error(errors) -> handler
Return the error handler for the specified error handling name or raise a
LookupError, if no handler exists under this name.
namereplace_errors(...)
Implements the 'namereplace' error handling, which replaces an unencodable character with a \N{...} escape sequence.
open(filename, mode='r', encoding=None, errors='strict', buffering=-1)
Open an encoded file using the given mode and return
a wrapped version providing transparent encoding/decoding.
Note: The wrapped version will only accept the object format
defined by the codecs, i.e. Unicode objects for most builtin
codecs. Output is also codec dependent and will usually be
Unicode as well.
If encoding is not None, then the
underlying encoded files are always opened in binary mode.
The default file mode is 'r', meaning to open the file in read mode.
encoding specifies the encoding which is to be used for the
file.
errors may be given to define the error handling. It defaults
to 'strict' which causes ValueErrors to be raised in case an
encoding error occurs.
buffering has the same meaning as for the builtin open() API.
It defaults to -1 which means that the default buffer size will
be used.
The returned wrapped file object provides an extra attribute
.encoding which allows querying the used encoding. This
attribute is only available if an encoding was specified as
parameter.
register(search_function, /)
Register a codec search function.
Search functions are expected to take one argument, the encoding name in
all lower case letters, and either return None, or a tuple of functions
(encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object).
register_error(errors, handler, /)
Register the specified error handler under the name errors.
handler must be a callable object, that will be called with an exception
instance containing information about the location of the encoding/decoding
error and must return a (replacement, new position) tuple.
replace_errors(...)
Implements the 'replace' error handling, which replaces malformed data with a replacement marker.
strict_errors(...)
Implements the 'strict' error handling, which raises a UnicodeError on coding errors.
xmlcharrefreplace_errors(...)
Implements the 'xmlcharrefreplace' error handling, which replaces an unencodable character with the appropriate XML character reference.
DATA
BOM = b'\xff\xfe'
BOM32_BE = b'\xfe\xff'
BOM32_LE = b'\xff\xfe'
BOM64_BE = b'\x00\x00\xfe\xff'
BOM64_LE = b'\xff\xfe\x00\x00'
BOM_BE = b'\xfe\xff'
BOM_LE = b'\xff\xfe'
BOM_UTF16 = b'\xff\xfe'
BOM_UTF16_BE = b'\xfe\xff'
BOM_UTF16_LE = b'\xff\xfe'
BOM_UTF32 = b'\xff\xfe\x00\x00'
BOM_UTF32_BE = b'\x00\x00\xfe\xff'
BOM_UTF32_LE = b'\xff\xfe\x00\x00'
BOM_UTF8 = b'\xef\xbb\xbf'
__all__ = ['register', 'lookup', 'open', 'EncodedFile', 'BOM', 'BOM_BE...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\codecs.py
ezdxf.colors
Python Library Documentation: module ezdxf.colors in ezdxf
NAME
ezdxf.colors
DESCRIPTION
# Copyright (c) 2020-2023, Manfred Moitzi
# License: MIT License
CLASSES
builtins.tuple(builtins.object)
RGB
RGBA
class RGB(builtins.tuple)
| RGB(r: ForwardRef('int'), g: ForwardRef('int'), b: ForwardRef('int'))
|
| Named tuple representing an RGB color value.
|
| Attributes:
| r: red channel in range [0, 255]
| g: green channel in range [0, 255]
| b: blue channel in range [0, 255]
|
| Method resolution order:
| RGB
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __getnewargs__(self) from collections.RGB
| Return self as a plain tuple. Used by copy and pickle.
|
| __repr__(self) from collections.RGB
| Return a nicely formatted representation string
|
| _asdict(self) from collections.RGB
| Return a new dict which maps field names to their values.
|
| _replace(self, /, **kwds) from collections.RGB
| Return a new RGB object replacing specified fields with new values
|
| to_floats(self) -> 'tuple[float, float, float]'
| Returns the color value as a tuple of floats in range [0, 1].
|
| to_hex(self) -> 'str'
| Returns the color value as hex string "#RRGGBB".
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| _make(iterable) from collections.RGB
| Make a new RGB object from a sequence or iterable
|
| from_floats(rgb: 'tuple[float, float, float]') -> 'Self'
| Returns an :class:`RGB` instance from floats in range [0, 1].
|
| from_hex(color: 'str') -> 'Self'
| Returns an :class:`RGB` instance from a hex color string, the `color` string
| is a hex string "RRGGBB" with an optional leading "#", an appended alpha
| channel is ignore.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(_cls, r: ForwardRef('int'), g: ForwardRef('int'), b: ForwardRef('int')) from namedtuple_RGB.RGB
| Create new instance of RGB(r, g, b)
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| luminance
| Returns perceived luminance for an RGB color in range [0.0, 1.0]
| from dark to light.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| r
| Alias for field number 0
|
| g
| Alias for field number 1
|
| b
| Alias for field number 2
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'b': ForwardRef('int'), 'g': ForwardRef('int'), 'r'...
|
| __match_args__ = ('r', 'g', 'b')
|
| __orig_bases__ = (<function NamedTuple>,)
|
| _field_defaults = {}
|
| _fields = ('r', 'g', 'b')
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class RGBA(builtins.tuple)
| RGBA(r: ForwardRef('int'), g: ForwardRef('int'), b: ForwardRef('int'), a: ForwardRef('int') = 255)
|
| Named tuple representing an RGBA color value.
| The default alpha channel is 255 (opaque).
|
| Attributes:
| r: red channel in range [0, 255]
| g: green channel in range [0, 255]
| b: blue channel in range [0, 255]
| a: alpha channel in range [0, 255], where 0 is transparent and 255 is opaque
|
| Method resolution order:
| RGBA
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __getnewargs__(self) from collections.RGBA
| Return self as a plain tuple. Used by copy and pickle.
|
| __repr__(self) from collections.RGBA
| Return a nicely formatted representation string
|
| _asdict(self) from collections.RGBA
| Return a new dict which maps field names to their values.
|
| _replace(self, /, **kwds) from collections.RGBA
| Return a new RGBA object replacing specified fields with new values
|
| to_floats(self) -> 'tuple[float, float, float, float]'
| Returns the color value as a tuple of floats in range [0, 1].
|
| to_hex(self) -> 'str'
| Returns the color value as hex string "#RRGGBBAA".
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| _make(iterable) from collections.RGBA
| Make a new RGBA object from a sequence or iterable
|
| from_floats(values: 'Sequence[float]') -> 'Self'
| Returns an :class:`RGBA` instance from floats in range [0, 1].
|
| The alpha channel is optional.
| The default alpha channel is 255 (opaque).
|
| from_hex(color: 'str') -> 'Self'
| Returns an :class:`RGBA` instance from a hex color string, the `color` string
| is a hex string "RRGGBBAA" with an optional leading "#".
| The alpha channel is optional.
| The default alpha channel is 255 (opaque).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(_cls, r: ForwardRef('int'), g: ForwardRef('int'), b: ForwardRef('int'), a: ForwardRef('int') = 255) from namedtuple_RGBA.RGBA
| Create new instance of RGBA(r, g, b, a)
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| luminance
| Returns perceived luminance for an RGB color in range [0.0, 1.0]
| from dark to light.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| r
| Alias for field number 0
|
| g
| Alias for field number 1
|
| b
| Alias for field number 2
|
| a
| Alias for field number 3
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'a': ForwardRef('int'), 'b': ForwardRef('int'), 'g'...
|
| __match_args__ = ('r', 'g', 'b', 'a')
|
| __orig_bases__ = (<function NamedTuple>,)
|
| _field_defaults = {'a': 255}
|
| _fields = ('r', 'g', 'b', 'a')
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
FUNCTIONS
aci2rgb(index: 'int') -> 'RGB'
Convert :ref:`ACI` into (r, g, b) tuple, based on default AutoCAD
colors.
decode_raw_color(value: 'int') -> 'tuple[int, Union[int, RGB]]'
Decode :term:`raw-color` value as tuple(type, Union[aci, (r, g, b)]), the
true color value is a (r, g, b) tuple.
decode_raw_color_int(value: 'int') -> 'tuple[int, int]'
Decode :term:`raw-color` value as tuple(type, int), the true color value
is a 24-bit int value.
encode_raw_color(value: 'Union[int, RGB]') -> 'int'
Encode :term:`true-color` value or :ref:`ACI` color value into a :term:
`raw color` value.
float2transparency(value: 'float') -> 'int'
Returns DXF transparency value as integer in the range from 0 to 255,
where 0 is 100% transparent and 255 is opaque.
Args:
value: transparency value as float in the range from 0 to 1, where 0 is
opaque and 1 is 100% transparent.
int2rgb(value: 'int') -> 'RGB'
Split RGB integer `value` into (r, g, b) tuple.
luminance(color: 'Sequence[float]') -> 'float'
Returns perceived luminance for an RGB color in the range [0.0, 1.0]
from dark to light.
rgb2int(rgb: 'RGB | tuple[int, int, int]') -> 'int'
Combined integer value from (r, g, b) tuple.
transparency2float(value: 'int') -> 'float'
Returns transparency value as float from 0 to 1, 0 for no transparency
(opaque) and 1 for 100% transparency.
Args:
value: DXF integer transparency value, 0 for 100% transparency and 255
for opaque
DATA
BLACK = 7
BLUE = 5
BYBLOCK = 0
BYLAYER = 256
BYOBJECT = 257
BY_BLOCK_RAW_VALUE = -1056964608
BY_LAYER_RAW_VALUE = -1073741824
COLOR_TYPE_ACI = 195
COLOR_TYPE_BY_BLOCK = 193
COLOR_TYPE_BY_LAYER = 192
COLOR_TYPE_RGB = 194
COLOR_TYPE_WINDOW_BG = 200
CYAN = 4
DXF_DEFAULT_COLORS = [0, 16711680, 16776960, 65280, 65535, 255, 167119...
DXF_DEFAULT_PAPERSPACE_COLORS = [0, 16711680, 16776960, 65280, 65535, ...
GRAY = 8
GREEN = 3
LIGHT_GRAY = 9
MAGENTA = 6
OPAQUE = 33554687
RED = 1
Self = typing.Self
Used to spell the type of "self" in classes.
Example::
from typing import Self
class Foo:
def return_self(self) -> Self:
...
return self
This is especially useful for:
- classmethods that are used as alternative constructors
- annotating an `__enter__` method which returns self
Sequence = typing.Sequence
A generic version of collections.abc.Sequence.
TRANSPARENCY_10 = 33554661
TRANSPARENCY_20 = 33554636
TRANSPARENCY_30 = 33554610
TRANSPARENCY_40 = 33554585
TRANSPARENCY_50 = 33554559
TRANSPARENCY_60 = 33554534
TRANSPARENCY_70 = 33554508
TRANSPARENCY_80 = 33554482
TRANSPARENCY_90 = 33554457
TRANSPARENCY_BYBLOCK = 16777216
Union = typing.Union
Union type; Union[X, Y] means either X or Y.
On Python 3.10 and higher, the | operator
can also be used to denote unions;
X | Y means the same thing to the type checker as Union[X, Y].
To define a union, use e.g. Union[int, str]. Details:
- The arguments must be types and there must be at least one.
- None as an argument is a special case and is replaced by
type(None).
- Unions of unions are flattened, e.g.::
assert Union[Union[int, str], float] == Union[int, str, float]
- Unions of a single argument vanish, e.g.::
assert Union[int] == int # The constructor actually returns int
- Redundant arguments are skipped, e.g.::
assert Union[int, str, int] == Union[int, str]
- When comparing unions, the argument order is ignored, e.g.::
assert Union[int, str] == Union[str, int]
- You cannot subclass or instantiate a union.
- You can use Optional[X] as a shorthand for Union[X, None].
WHITE = 7
WINDOW_BG_RAW_VALUE = -939524096
YELLOW = 2
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\colors.py
ezdxf.config_files
Python Library Documentation: function config_files in module ezdxf._options config_files() -> 'list[Path]'
ezdxf.const
Python Library Documentation: module ezdxf.lldxf.const in ezdxf.lldxf
NAME
ezdxf.lldxf.const
DESCRIPTION
# Copyright (c) 2011-2022, Manfred Moitzi
# License: MIT License
CLASSES
builtins.Exception(builtins.BaseException)
DXFError
DXFAttributeError(DXFError, builtins.AttributeError)
DXFDecodingError
DXFEncodingError
DXFIndexError(DXFError, builtins.IndexError)
DXFInternalEzdxfError
DXFKeyError(DXFError, builtins.KeyError)
DXFUndefinedBlockError
DXFLoadError
DXFRenderError
DXFMissingDefinitionPoint
DXFStructureError
DXFAppDataError
DXFXDataError
DXFTypeError(DXFError, builtins.TypeError)
DXFUnsupportedFeature
DXFValueError(DXFError, builtins.ValueError)
DXFBlockInUseError
DXFInvalidLineType
DXFTableEntryError
DXFVersionError
InvalidGeoDataException
builtins.object
BoundaryPathState
class BoundaryPathState(builtins.object)
| BoundaryPathState(external: 'bool' = False, derived: 'bool' = False, textbox: 'bool' = False, outermost: 'bool' = False) -> None
|
| BoundaryPathState(external: 'bool' = False, derived: 'bool' = False, textbox: 'bool' = False, outermost: 'bool' = False)
|
| Methods defined here:
|
| __delattr__(self, name)
| Implement delattr(self, name).
|
| __eq__(self, other)
| Return self==value.
|
| __hash__(self)
| Return hash(self).
|
| __init__(self, external: 'bool' = False, derived: 'bool' = False, textbox: 'bool' = False, outermost: 'bool' = False) -> None
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| __setattr__(self, name, value)
| Implement setattr(self, name, value).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| from_flags(flag: 'int') -> "'BoundaryPathState'"
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| default
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __annotations__ = {'derived': 'bool', 'external': 'bool', 'outermost':...
|
| __dataclass_fields__ = {'derived': Field(name='derived',type='bool',de...
|
| __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,or...
|
| __match_args__ = ('external', 'derived', 'textbox', 'outermost')
|
| derived = False
|
| external = False
|
| outermost = False
|
| textbox = False
class DXFAppDataError(DXFStructureError)
| Method resolution order:
| DXFAppDataError
| DXFStructureError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFAttributeError(DXFError, builtins.AttributeError)
| Method resolution order:
| DXFAttributeError
| DXFError
| builtins.AttributeError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.AttributeError:
|
| __getstate__(...)
| Helper for pickle.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.AttributeError:
|
| name
| attribute name
|
| obj
| object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFBlockInUseError(DXFValueError)
| Method resolution order:
| DXFBlockInUseError
| DXFValueError
| DXFError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.ValueError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.ValueError:
|
| __new__(*args, **kwargs) class method of builtins.ValueError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFDecodingError(DXFError)
| Method resolution order:
| DXFDecodingError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFEncodingError(DXFError)
| Method resolution order:
| DXFEncodingError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFError(builtins.Exception)
| Base exception for all `ezdxf` exceptions.
|
| Method resolution order:
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFIndexError(DXFError, builtins.IndexError)
| Method resolution order:
| DXFIndexError
| DXFError
| builtins.IndexError
| builtins.LookupError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.IndexError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.IndexError:
|
| __new__(*args, **kwargs) class method of builtins.IndexError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFInternalEzdxfError(DXFError)
| Indicates internal errors - should be fixed by mozman
|
| Method resolution order:
| DXFInternalEzdxfError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFInvalidLineType(DXFValueError)
| Method resolution order:
| DXFInvalidLineType
| DXFValueError
| DXFError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.ValueError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.ValueError:
|
| __new__(*args, **kwargs) class method of builtins.ValueError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFKeyError(DXFError, builtins.KeyError)
| Method resolution order:
| DXFKeyError
| DXFError
| builtins.KeyError
| builtins.LookupError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.KeyError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.LookupError:
|
| __new__(*args, **kwargs) class method of builtins.LookupError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFLoadError(DXFError)
| Method resolution order:
| DXFLoadError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFMissingDefinitionPoint(DXFRenderError)
| Missing required definition points in the DIMENSION entity.
|
| Method resolution order:
| DXFMissingDefinitionPoint
| DXFRenderError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFRenderError(DXFError)
| Errors related to DXF "rendering" tasks.
|
| In this context "rendering" means creating the graphical representation of
| complex DXF entities by DXF primitives (LINE, TEXT, ...)
| e.g. for DIMENSION or LEADER entities.
|
| Method resolution order:
| DXFRenderError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFStructureError(DXFError)
| Method resolution order:
| DXFStructureError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFTableEntryError(DXFValueError)
| Method resolution order:
| DXFTableEntryError
| DXFValueError
| DXFError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.ValueError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.ValueError:
|
| __new__(*args, **kwargs) class method of builtins.ValueError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFTypeError(DXFError, builtins.TypeError)
| Method resolution order:
| DXFTypeError
| DXFError
| builtins.TypeError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.TypeError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.TypeError:
|
| __new__(*args, **kwargs) class method of builtins.TypeError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFUndefinedBlockError(DXFKeyError)
| Method resolution order:
| DXFUndefinedBlockError
| DXFKeyError
| DXFError
| builtins.KeyError
| builtins.LookupError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.KeyError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.LookupError:
|
| __new__(*args, **kwargs) class method of builtins.LookupError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFUnsupportedFeature(DXFError)
| Indicates unsupported features for DXFEntities e.g. translation for
| ACIS data
|
| Method resolution order:
| DXFUnsupportedFeature
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFValueError(DXFError, builtins.ValueError)
| Method resolution order:
| DXFValueError
| DXFError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.ValueError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.ValueError:
|
| __new__(*args, **kwargs) class method of builtins.ValueError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFVersionError(DXFError)
| Errors related to features not supported by the chosen DXF Version
|
| Method resolution order:
| DXFVersionError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class DXFXDataError(DXFStructureError)
| Method resolution order:
| DXFXDataError
| DXFStructureError
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class InvalidGeoDataException(DXFError)
| Method resolution order:
| InvalidGeoDataException
| DXFError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from DXFError:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
boundary_path_flag_names(flags: 'int') -> 'list[str]'
normalize_dxfversion(dxfversion: 'str', check_save=True) -> 'str'
Normalizes the DXF version string to "AC10xx".
DATA
ACAD_REACTORS = '{ACAD_REACTORS'
ACAD_XDICTIONARY = '{ACAD_XDICTIONARY'
ALIGNED = 3
APP_DATA_MARKER = 102
ATTDEF_TYPE_MULTI_LINE = 4
ATTRIB_CONST = 2
ATTRIB_INVISIBLE = 1
ATTRIB_IS_PRESET = 8
ATTRIB_TYPE_MULTI_LINE = 2
ATTRIB_TYPE_SINGLE_LINE = 1
ATTRIB_VERIFY = 4
BACKWARD = 2
BASELINE = 0
BLACK = 7
BLK_ANONYMOUS = 1
BLK_EXTERNAL = 16
BLK_NON_CONSTANT_ATTRIBUTES = 2
BLK_REFERENCED = 64
BLK_RESOLVED = 32
BLK_XREF = 4
BLK_XREF_OVERLAY = 8
BLUE = 5
BOTTOM = 1
BOUNDARY_PATH_DEFAULT = 0
BOUNDARY_PATH_DERIVED = 4
BOUNDARY_PATH_EXTERNAL = 1
BOUNDARY_PATH_OUTERMOST = 16
BOUNDARY_PATH_POLYLINE = 2
BOUNDARY_PATH_TEXTBOX = 8
BYBLOCK = 0
BYLAYER = 256
BYOBJECT = 257
CENTER = 1
CLOSED_SPLINE = 1
COMMENT_MARKER = 999
COMPRESSED_TAGS = -10
CYAN = 4
DEFAULT_ENCODING = 'cp1252'
DEFAULT_TEXT_FONT = 'txt'
DEFAULT_TEXT_STYLE = 'Standard'
DEFAULT_TTF = 'DejaVuSans.ttf'
DIMJUST = {'above1': 3, 'above2': 4, 'center': 0, 'left': 1, 'right': ...
DIMTAD = {'above': 1, 'below': 4, 'center': 0}
DIMZIN_INCLUDES_ZERO_FEET_AND_PRECISELY_ZERO_INCHES = 1
DIMZIN_INCLUDES_ZERO_FEET_AND_SUPPRESSES_ZERO_INCHES = 2
DIMZIN_INCLUDES_ZERO_INCHES_AND_SUPPRESSES_ZERO_FEET = 3
DIMZIN_SUPPRESSES_LEADING_ZEROS = 4
DIMZIN_SUPPRESSES_TRAILING_ZEROS = 8
DIMZIN_SUPPRESS_ZERO_FEET_AND_PRECISELY_ZERO_INCHES = 0
DIM_ALIGNED = 1
DIM_ANGULAR = 2
DIM_ANGULAR_3P = 5
DIM_ARC = 8
DIM_BLOCK_EXCLUSIVE = 32
DIM_DIAMETER = 3
DIM_LINEAR = 0
DIM_ORDINATE = 6
DIM_ORDINATE_TYPE = 64
DIM_RADIUS = 4
DIM_USER_LOCATION_OVERRIDE = 128
DXF10 = 'AC1006'
DXF12 = 'AC1009'
DXF13 = 'AC1012'
DXF14 = 'AC1014'
DXF2000 = 'AC1015'
DXF2004 = 'AC1018'
DXF2007 = 'AC1021'
DXF2010 = 'AC1024'
DXF2013 = 'AC1027'
DXF2018 = 'AC1032'
DXF9 = 'AC1004'
EXT_MAX_STR_LEN = 2049
FIT = 5
GRADIENT_TYPES = frozenset({'CURVED', 'CYLINDER', 'HEMISPHERICAL', 'IN...
GREEN = 3
HATCH_PATTERN_TYPE = ['user-defined', 'predefined', 'custom']
HATCH_STYLE_IGNORE = 2
HATCH_STYLE_NESTED = 0
HATCH_STYLE_NORMAL = 0
HATCH_STYLE_OUTERMOST = 1
HATCH_TYPE_CUSTOM = 2
HATCH_TYPE_PREDEFINED = 1
HATCH_TYPE_USER_DEFINED = 0
HEADER_VAR_MARKER = 9
IMAGE_SHOW = 1
IMAGE_SHOW_WHEN_NOT_ALIGNED = 2
IMAGE_TRANSPARENCY_IS_ON = 8
IMAGE_USE_CLIPPING_BOUNDARY = 4
INVALID_LAYER_NAME_CHARACTERS = {'"', '*', '/', ':', ';', '<', ...}
INVALID_NAME_CHARACTERS = r'<>/\":;?*=`'
ISLAND_DETECTION = ['nested', 'outermost', 'ignore']
LATEST_DXF_VERSION = 'AC1032'
LAYOUT_NAMES = {'$model_space', '$paper_space', '*model_space', '*pape...
LEFT = 0
LINEAR_SPLINE = 16
LINEWEIGHT_BYBLOCK = -2
LINEWEIGHT_BYLAYER = -1
LINEWEIGHT_DEFAULT = -3
LWPOLYLINE_CLOSED = 1
LWPOLYLINE_PLINEGEN = 128
MAGENTA = 6
MANAGED_SECTIONS = {'ACDSDATA', 'BLOCKS', 'CLASSES', 'ENTITIES', 'HEAD...
MAX_STR_LEN = 255
MAX_VALID_LINEWEIGHT = 211
MIDDLE = 2
MIRROR_X = 2
MIRROR_Y = 4
MLINESTYLE_END_INNER_ARC = 512
MLINESTYLE_END_ROUND = 1024
MLINESTYLE_END_SQUARE = 256
MLINESTYLE_FILL = 1
MLINESTYLE_MITER = 2
MLINESTYLE_START_INNER_ARC = 32
MLINESTYLE_START_ROUND = 64
MLINESTYLE_START_SQUARE = 16
MLINE_BOTTOM = 2
MLINE_CLOSED = 2
MLINE_HAS_VERTICES = 1
MLINE_SUPPRESS_END_CAPS = 8
MLINE_SUPPRESS_START_CAPS = 4
MLINE_TOP = 0
MLINE_ZERO = 1
MODEL_SPACE = {'$model_space', '*model_space'}
MODEL_SPACE_R12 = '$Model_Space'
MODEL_SPACE_R2000 = '*Model_Space'
MTEXT_AT_LEAST = 1
MTEXT_BG_CANVAS_COLOR = 3
MTEXT_BG_COLOR = 1
MTEXT_BG_OFF = 0
MTEXT_BG_WINDOW_COLOR = 2
MTEXT_BOTTOM_CENTER = 8
MTEXT_BOTTOM_LEFT = 7
MTEXT_BOTTOM_RIGHT = 9
MTEXT_BY_STYLE = 5
MTEXT_COLOR_INDEX = {'blue': 5, 'cyan': 4, 'green': 3, 'magenta': 6, '...
MTEXT_EXACT = 2
MTEXT_LEFT_TO_RIGHT = 1
MTEXT_MIDDLE_CENTER = 5
MTEXT_MIDDLE_LEFT = 4
MTEXT_MIDDLE_RIGHT = 6
MTEXT_TEXT_FRAME = 16
MTEXT_TOP_CENTER = 2
MTEXT_TOP_LEFT = 1
MTEXT_TOP_RIGHT = 3
MTEXT_TOP_TO_BOTTOM = 3
OVR_ALPHA_CODE = 440
OVR_ALPHA_KEY = 'ADSK_XREC_LAYER_ALPHA_OVR'
OVR_APP_ALPHA = '{ADSK_LYR_ALPHA_OVERRIDE'
OVR_APP_COLOR = '{ADSK_LYR_COLOR_OVERRIDE'
OVR_APP_LTYPE = '{ADSK_LYR_LINETYPE_OVERRIDE'
OVR_APP_LW = '{ADSK_LYR_LINEWT_OVERRIDE'
OVR_COLOR_CODE = 420
OVR_COLOR_KEY = 'ADSK_XREC_LAYER_COLOR_OVR'
OVR_LTYPE_CODE = 343
OVR_LTYPE_KEY = 'ADSK_XREC_LAYER_LINETYPE_OVR'
OVR_LW_CODE = 91
OVR_LW_KEY = 'ADSK_XREC_LAYER_LINEWT_OVR'
OVR_VP_HANDLE_CODE = 335
OWNER_CODE = 330
PAPER_SPACE = {'$paper_space', '*paper_space'}
PAPER_SPACE_R12 = '$Paper_Space'
PAPER_SPACE_R2000 = '*Paper_Space'
PERIODIC_SPLINE = 2
PLANAR_SPLINE = 8
POLYLINE_3D_POLYLINE = 8
POLYLINE_3D_POLYMESH = 16
POLYLINE_CLOSED = 1
POLYLINE_CURVE_FIT_VERTICES_ADDED = 2
POLYLINE_FLAGS = {'AcDb2dPolyline': 0, 'AcDb3dPolyline': 8, 'AcDbPolyF...
POLYLINE_GENERATE_LINETYPE_PATTERN = 128
POLYLINE_MESH_CLOSED_M_DIRECTION = 1
POLYLINE_MESH_CLOSED_N_DIRECTION = 32
POLYLINE_POLYFACE = 64
POLYLINE_SPLINE_FIT_VERTICES_ADDED = 4
POLYMESH_BEZIER_SURFACE = 8
POLYMESH_CUBIC_BSPLINE = 6
POLYMESH_NO_SMOOTH = 0
POLYMESH_QUADRATIC_BSPLINE = 5
RASTER_UNITS = {'cm': 2, 'ft': 6, 'in': 5, 'km': 4, 'm': 3, 'mi': 8, '...
RATIONAL_SPLINE = 4
REACTOR_HANDLE_CODE = 330
RED = 1
REVERSE_RASTER_UNITS = {0: 'none', 1: 'mm', 2: 'cm', 3: 'm', 4: 'km', ...
RIGHT = 2
SPECIAL_CHAR_ENCODING = {'c': 'Ø', 'd': '°', 'p': '±'}
STD_SCALES = {1: (0.0078125, 12.0), 2: (0.015625, 12.0), 3: (0.03125, ...
STRUCTURE_MARKER = 0
SUBCLASS_MARKER = 100
TABLE_NAMES_ACAD_ORDER = ['VPORT', 'LTYPE', 'LAYER', 'STYLE', 'VIEW', ...
TMP_PAPER_SPACE_NAME = '*Paper_Space999999'
TOP = 3
TRANSPARENCY_BYBLOCK = 16777216
UNDERLAY_ADJUST_FOR_BG = 8
UNDERLAY_CLIPPING = 1
UNDERLAY_MONOCHROME = 4
UNDERLAY_ON = 2
UPSIDE_DOWN = 4
VALID_DXF_LINEWEIGHTS = (0, 5, 9, 13, 15, 18, 20, 25, 30, 35, 40, 50, ...
VALID_DXF_LINEWEIGHT_VALUES = {-3, -2, -1, 0, 5, 9, ...}
VERTEXNAMES = ('vtx0', 'vtx1', 'vtx2', 'vtx3')
VERTEX_FLAGS = {'AcDb2dPolyline': 0, 'AcDb3dPolyline': 32, 'AcDbPolyFa...
VERTICAL_STACKED = 4
VRM_2D_OPTIMIZED = 0
VRM_FLAT_SHADED = 3
VRM_FLAT_SHADED_WITH_WIREFRAME = 5
VRM_GOURAUD_SHADED = 4
VRM_GOURAUD_SHADED_WITH_WIREFRAME = 6
VRM_HIDDEN_LINE = 2
VRM_WIREFRAME = 1
VSF_ADAPTIVE_GRID_DISPLAY = 524288
VSF_BACK_CLIPPING = 4
VSF_CURRENTLY_ALWAYS_ENABLED = 32768
VSF_FAST_ZOOM = 128
VSF_FRONT_CLIPPING = 2
VSF_FRONT_CLIPPING_NOT_AT_EYE = 16
VSF_GRID_FOLLOW_WORKPLANE = 2097152
VSF_GRID_MODE = 512
VSF_HIDE_PLOT_MODE = 2048
VSF_ISOMETRIC_SNAP_STYLE = 1024
VSF_KISOPAIR_RIGHT = 8192
VSF_KISOPAIR_TOP = 4096
VSF_LOCK_ZOOM = 16384
VSF_NON_RECTANGULAR_CLIPPING = 65536
VSF_NO_GRID_LIMITS = 262144
VSF_PERSPECTIVE_MODE = 1
VSF_SNAP_MODE = 256
VSF_SUBDIVIDE_GRID = 1048576
VSF_TURN_VIEWPORT_OFF = 131072
VSF_UCS_ICON_AT_ORIGIN = 64
VSF_UCS_ICON_VISIBILITY = 32
VSF_USC_FOLLOW = 8
VSF_VIEWPORT_ZOOM_LOCKING = 16384
VTX_3D_POLYFACE_MESH_VERTEX = 128
VTX_3D_POLYGON_MESH_VERTEX = 64
VTX_3D_POLYLINE_VERTEX = 32
VTX_CURVE_FIT_TANGENT = 2
VTX_EXTRA_VERTEX_CREATED = 1
VTX_SPLINE_FRAME_CONTROL_POINT = 16
VTX_SPLINE_VERTEX_CREATED = 8
WHITE = 7
XDATA_MARKER = 1001
XDICT_HANDLE_CODE = 360
YELLOW = 2
acad_maint_ver = {'AC1009': 0, 'AC1015': 6, 'AC1018': 0, 'AC1021': 25,...
acad_release = {'AC1004': 'R9', 'AC1006': 'R10', 'AC1009': 'R12', 'AC1...
acad_release_to_dxf_version = {'R10': 'AC1006', 'R12': 'AC1009', 'R13'...
versions_supported_by_new = ['AC1009', 'AC1015', 'AC1018', 'AC1021', '...
versions_supported_by_save = ['AC1009', 'AC1015', 'AC1018', 'AC1021', ...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\lldxf\const.py
ezdxf.decode_base64
Python Library Documentation: function decode_base64 in module ezdxf.filemanagement
decode_base64(data: 'bytes', errors: 'str' = 'surrogateescape') -> 'Drawing'
Load a DXF document from base64 encoded binary data, like uploaded data
to web applications.
Args:
data: DXF document base64 encoded binary data
errors: specify decoding error handler
- "surrogateescape" to preserve possible binary data (default)
- "ignore" to use the replacement char U+FFFD "�" for invalid data
- "strict" to raise an :class:`UnicodeDecodeError` exception for invalid data
Raises:
DXFStructureError: for invalid or corrupted DXF structures
UnicodeDecodeError: if `errors` is "strict" and a decoding error occurs
ezdxf.decode_dxf_unicode
Python Library Documentation: function decode_dxf_unicode in module ezdxf.lldxf.encoding
decode_dxf_unicode(s: str) -> str
Decode ``\U+xxxx`` encoded characters.
ezdxf.document
Python Library Documentation: module ezdxf.document in ezdxf
NAME
ezdxf.document
DESCRIPTION
# Copyright (c) 2011-2024, Manfred Moitzi
# License: MIT License
CLASSES
abc.ABC(builtins.object)
MetaData
R12MetaData
R2000MetaData
builtins.object
Drawing
class Drawing(builtins.object)
| Drawing(dxfversion='AC1027') -> 'None'
|
| Methods defined here:
|
| __init__(self, dxfversion='AC1027') -> 'None'
| Initialize self. See help(type(self)) for accurate signature.
|
| acquire_arrow(self, name: 'str')
| For standard AutoCAD and ezdxf arrows create block definitions if
| required, otherwise check if block `name` exist. (internal API)
|
| active_layout(self) -> 'Paperspace'
| Returns the active paperspace layout, defined by block record name
| "\*Paper_Space".
|
| add_acad_incompatibility_message(self, msg: 'str')
| Add a reason why this document is not compatible to AutoCAD.
| (internal API)
|
| add_image_def(self, filename: 'str', size_in_pixel: 'tuple[int, int]', name=None)
| Add an image definition to the objects section.
|
| Add an :class:`~ezdxf.entities.image.ImageDef` entity to the drawing
| (objects section). `filename` is the image file name as relative or
| absolute path and `size_in_pixel` is the image size in pixel as (x, y)
| tuple. To avoid dependencies to external packages, `ezdxf` can not
| determine the image size by itself. Returns a
| :class:`~ezdxf.entities.image.ImageDef` entity which is needed to
| create an image reference. `name` is the internal image name, if set to
| ``None``, name is auto-generated.
|
| Absolute image paths works best for AutoCAD but not perfect, you
| have to update external references manually in AutoCAD, which is not
| possible in TrueView. If the drawing units differ from 1 meter, you
| also have to use: :meth:`set_raster_variables`.
|
| Args:
| filename: image file name (absolute path works best for AutoCAD)
| size_in_pixel: image size in pixel as (x, y) tuple
| name: image name for internal use, None for using filename as name
| (best for AutoCAD)
|
| .. seealso::
|
| :ref:`tut_image`
|
| add_underlay_def(self, filename: 'str', fmt: 'str' = 'ext', name: 'Optional[str]' = None)
| Add an :class:`~ezdxf.entities.underlay.UnderlayDef` entity to the drawing
| (OBJECTS section). The `filename` is the underlay file name as relative or
| absolute path and `fmt` as string (pdf, dwf, dgn).
| The underlay definition is required to create an underlay reference.
|
| Args:
| filename: underlay file name
| fmt: file format as string "pdf"|"dwf"|"dgn" or "ext"
| for getting file format from filename extension
| name: pdf format = page number to display; dgn format = "default"; dwf: ????
|
| .. seealso::
|
| :ref:`tut_underlay`
|
| add_xref_def(self, filename: 'str', name: 'str', flags: 'int' = 20)
| Add an external reference (xref) definition to the blocks section.
|
| Args:
| filename: external reference filename
| name: name of the xref block
| flags: block flags
|
| audit(self) -> 'Auditor'
| Checks document integrity and fixes all fixable problems, not
| fixable problems are stored in :attr:`Auditor.errors`.
|
| If you are messing around with internal structures, call this method
| before saving to be sure to export valid DXF documents, but be aware
| this is a long-running task.
|
| chain_layouts_and_blocks(self) -> 'Iterator[DXFEntity]'
| Chain entity spaces of all layouts and blocks. Yields an iterator
| for all entities in all layouts and blocks.
|
| commit_pending_changes(self) -> 'None'
|
| create_all_arrow_blocks(self)
| For upgrading DXF R12/13/14 files to R2000, it is necessary to
| create all used arrow blocks before saving the DXF file, else $HANDSEED
| is not the next available handle, which is a problem for AutoCAD.
|
| Create all known AutoCAD arrows to be on the safe side, because
| references to arrow blocks can be in DIMSTYLE, DIMENSION override,
| LEADER override and maybe other locations.
|
| delete_layout(self, name: 'str') -> 'None'
| Delete paper space layout `name` and all entities owned by this layout.
| Available only for DXF R2000 or later, DXF R12 supports only one
| paperspace, and it can't be deleted.
|
| encode(self, s: 'str') -> 'bytes'
| Encode string `s` with correct encoding and error handler.
|
| encode_base64(self) -> 'bytes'
| Returns DXF document as base64 encoded binary data.
|
| export_sections(self, tagwriter: 'AbstractTagWriter') -> 'None'
| DXF export sections. (internal API)
|
| ezdxf_metadata(self) -> 'MetaData'
| Returns the *ezdxf* :class:`ezdxf.document.MetaData` object, which
| manages *ezdxf* and custom metadata in DXF files.
| For more information see: :ref:`ezdxf_metadata`.
|
| get_abs_filepath(self) -> 'pathlib.Path'
| Returns the absolute filepath of the document.
|
| groupby(self, dxfattrib='', key=None) -> 'dict'
| Groups DXF entities of all layouts and blocks (excluding the
| OBJECTS section) by a DXF attribute or a key function.
|
| Args:
| dxfattrib: grouping DXF attribute like "layer"
| key: key function, which accepts a :class:`DXFEntity` as argument
| and returns a hashable grouping key or ``None`` to ignore
| this entity.
|
| .. seealso::
|
| :func:`~ezdxf.groupby.groupby` documentation
|
| layout(self, name: 'str' = '') -> 'Layout'
| Returns paperspace layout `name` or the first layout in tab-order
| if no name is given.
|
| Args:
| name: paperspace name or empty string for the first paperspace in
| tab-order
|
| Raises:
| KeyError: layout `name` does not exist
|
| layout_names(self) -> 'Iterable[str]'
| Returns all layout names in arbitrary order.
|
| layout_names_in_taborder(self) -> 'Iterable[str]'
| Returns all layout names in tab-order, "Model" is always the first name.
|
| layouts_and_blocks(self) -> 'Iterator[GenericLayoutType]'
| Iterate over all layouts (modelspace and paperspace) and all block definitions.
|
| modelspace(self) -> 'Modelspace'
| Returns the modelspace layout, displayed as "Model" tab in CAD
| applications, defined by block record named "\*Model_Space".
|
| new_layout(self, name, dxfattribs=None) -> 'Paperspace'
| Create a new paperspace layout `name`. Returns a :class:`~ezdxf.layouts.Paperspace`
| object. DXF R12 (AC1009) supports only one paperspace layout, only the active
| paperspace layout is saved, other layouts are dismissed.
|
| Args:
| name: unique layout name
| dxfattribs: additional DXF attributes for the
| :class:`~ezdxf.entities.layout.DXFLayout` entity
|
| Raises:
| DXFValueError: paperspace layout `name` already exist
|
| page_setup(self, name: 'str' = 'Layout1', fmt: 'str' = 'ISO A3', landscape=True) -> 'Paperspace'
| Creates a new paperspace layout if `name` does not exist or reset the
| existing layout. This method requires DXF R2000 or newer.
| The paper format name `fmt` defines one of the following paper sizes,
| measures in landscape orientation:
|
| =========== ======= ======= =======
| Name Units Width Height
| =========== ======= ======= =======
| ISO A0 mm 1189 841
| ISO A1 mm 841 594
| ISO A2 mm 594 420
| ISO A3 mm 420 297
| ISO A4 mm 297 210
| ANSI A inch 11 8.5
| ANSI B inch 17 11
| ANSI C inch 22 17
| ANSI D inch 34 22
| ANSI E inch 44 34
| ARCH C inch 24 18
| ARCH D inch 36 24
| ARCH E inch 48 36
| ARCH E1 inch 42 30
| Letter inch 11 8.5
| Legal inch 14 8.5
| =========== ======= ======= =======
|
| The layout uses the associated units of the paper format as drawing
| units, has no margins or offset defined and the scale of the paperspace
| layout is 1:1.
|
| Args:
| name: paperspace layout name
| fmt: paper format
| landscape: ``True`` for landscape orientation, ``False`` for portrait
| orientation
|
| paperspace(self, name: 'str' = '') -> 'Paperspace'
| Returns paperspace layout `name` or the active paperspace if no
| name is given.
|
| Args:
| name: paperspace name or empty string for the active paperspace
|
| Raises:
| KeyError: if the modelspace was acquired or layout `name` does not exist
|
| query(self, query: 'str' = '*') -> 'EntityQuery'
| Entity query over all layouts and blocks, excluding the OBJECTS section and
| the resource tables of the TABLES section.
|
| Args:
| query: query string
|
| .. seealso::
|
| :ref:`entity query string` and :ref:`entity queries`
|
| reset_fingerprint_guid(self)
| Reset fingerprint GUID.
|
| reset_version_guid(self)
| Reset version GUID.
|
| save(self, encoding: 'Optional[str]' = None, fmt: 'str' = 'asc') -> 'None'
| Write drawing to file-system by using the :attr:`filename` attribute
| as filename. Override file encoding by argument `encoding`, handle with
| care, but this option allows you to create DXF files for applications
| that handle file encoding different from AutoCAD.
|
| Args:
| encoding: override default encoding as Python encoding string like ``'utf-8'``
| fmt: ``'asc'`` for ASCII DXF (default) or ``'bin'`` for Binary DXF
|
| saveas(self, filename: 'Union[os.PathLike, str]', encoding: 'Optional[str]' = None, fmt: 'str' = 'asc') -> 'None'
| Set :class:`Drawing` attribute :attr:`filename` to `filename` and
| write drawing to the file system. Override file encoding by argument
| `encoding`, handle with care, but this option allows you to create DXF
| files for applications that handles file encoding different than
| AutoCAD.
|
| Args:
| filename: file name as string
| encoding: override default encoding as Python encoding string like ``'utf-8'``
| fmt: ``'asc'`` for ASCII DXF (default) or ``'bin'`` for Binary DXF
|
| set_modelspace_vport(self, height, center=(0, 0), *, dxfattribs=None) -> 'VPort'
| Set initial view/zoom location for the modelspace, this replaces
| the current "\*Active" viewport configuration
| (:class:`~ezdxf.entities.VPort`) and reset the coordinate system to the
| :ref:`WCS`.
|
| Args:
| height: modelspace area to view
| center: modelspace location to view in the center of the CAD
| application window.
| dxfattribs: additional DXF attributes for the VPORT entity
|
| set_raster_variables(self, frame: 'int' = 0, quality: 'int' = 1, units: 'str' = 'm')
| Set raster variables.
|
| Args:
| frame: 0 = do not show image frame; 1 = show image frame
| quality: 0 = draft; 1 = high
| units: units for inserting images. This defines the real world unit
| for one drawing unit for the purpose of inserting and scaling
| images with an associated resolution.
|
| ===== ===========================
| mm Millimeter
| cm Centimeter
| m Meter (ezdxf default)
| km Kilometer
| in Inch
| ft Foot
| yd Yard
| mi Mile
| ===== ===========================
|
| set_wipeout_variables(self, frame=0)
| Set wipeout variables.
|
| Args:
| frame: 0 = do not show image frame; 1 = show image frame
|
| update_all(self) -> 'None'
|
| update_extents(self)
|
| update_limits(self)
|
| validate(self, print_report=True) -> 'bool'
| Simple way to run an audit process. Fixes all fixable problems,
| return ``False`` if not fixable errors occurs. Prints a report of resolved and
| unrecoverable errors, if requested.
|
| Args:
| print_report: print report to stdout
|
| Returns: ``False`` if unrecoverable errors exist
|
| write(self, stream: 'Union[TextIO, BinaryIO]', fmt: 'str' = 'asc') -> 'None'
| Write drawing as ASCII DXF to a text stream or as Binary DXF to a
| binary stream. For DXF R2004 (AC1018) and prior open stream with
| drawing :attr:`encoding` and :code:`mode='wt'`. For DXF R2007 (AC1021)
| and later use :code:`encoding='utf-8'`, or better use the later added
| :class:`Drawing` property :attr:`output_encoding` which returns the
| correct encoding automatically. The correct and required error handler
| is :code:`errors='dxfreplace'`!
|
| If writing to a :class:`StringIO` stream, use :meth:`Drawing.encode` to
| encode the result string from :meth:`StringIO.get_value`::
|
| binary = doc.encode(stream.get_value())
|
| Args:
| stream: output text stream or binary stream
| fmt: "asc" for ASCII DXF (default) or "bin" for binary DXF
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_tags(compiled_tags: 'Iterable[DXFTag]') -> 'Drawing'
| Create new drawing from compiled tags. (internal API)
|
| load(tag_loader: 'Iterable[DXFTag]') -> 'Drawing'
| Load DXF document from a DXF tag loader, in general an external
| untrusted source.
|
| Args:
| tag_loader: DXF tag loader
|
| new(dxfversion: 'str' = 'AC1027') -> 'Drawing'
| Create new drawing. Package users should use the factory function
| :func:`ezdxf.new`. (internal API)
|
| read(stream: 'TextIO') -> 'Drawing'
| Open an existing drawing. Package users should use the factory
| function :func:`ezdxf.read`. To preserve possible binary data in
| XRECORD entities use :code:`errors='surrogateescape'` as error handler
| for the import stream.
|
| Args:
| stream: text stream yielding text (unicode) strings by readline()
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| acad_incompatibility_reasons
| Returns a list of reasons why this document is not compatible to AutoCAD.
|
| acad_release
| Returns the AutoCAD release abbreviation like "R12" or "R2000".
|
| appids
|
| block_records
|
| dimstyles
|
| is_acad_compatible
| Returns ``True`` if the current state of the document is compatible to
| AutoCAD.
|
| layers
|
| linetypes
|
| loaded_dxfversion
|
| output_encoding
| Returns required output encoding for writing document to a text
| streams.
|
| plotstyles
|
| styles
|
| ucs
|
| viewports
|
| views
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| dimension_renderer
|
| dxfversion
| Get current DXF version.
|
| units
| Get and set the document/modelspace base units as enum, for more
| information read this: :ref:`dxf units`. Requires DXF R2000 or newer.
class MetaData(abc.ABC)
| Manage ezdxf meta-data by dict-like interface. Values are limited to
| strings with a maximum length of 254 characters.
|
| Method resolution order:
| MetaData
| abc.ABC
| builtins.object
|
| Methods defined here:
|
| __contains__(self, key: 'str') -> 'bool'
| Returns `key` ``in`` self.
|
| __delitem__(self, key: 'str') -> 'None'
| Delete self[`key`].
|
| Raises:
| KeyError: `key` does not exist
|
| __getitem__(self, key: 'str') -> 'str'
| Returns the value for self[`key`].
|
| Raises:
| KeyError: `key` does not exist
|
| __setitem__(self, key: 'str', value: 'str') -> 'None'
| Set self[`key`] to `value`.
|
| discard(self, key: 'str') -> 'None'
| Remove `key`, does **not** raise an exception if `key` not exist.
|
| get(self, key: 'str', default: 'str' = '') -> 'str'
| Returns the value for `key`. Returns `default` if `key` not exist.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset({'__contains__', '__delitem__', '__get...
class R12MetaData(MetaData)
| R12MetaData(doc: 'Drawing')
|
| Manage ezdxf meta data for DXF version R12 as XDATA of layer "0".
|
| Layer "0" is mandatory and can not be deleted.
|
| Method resolution order:
| R12MetaData
| MetaData
| abc.ABC
| builtins.object
|
| Methods defined here:
|
| __contains__(self, key: 'str') -> 'bool'
| Returns `key` ``in`` self.
|
| __delitem__(self, key: 'str') -> 'None'
| Delete self[`key`].
|
| Raises:
| KeyError: `key` does not exist
|
| __getitem__(self, key: 'str') -> 'str'
| Returns the value for self[`key`].
|
| Raises:
| KeyError: `key` does not exist
|
| __init__(self, doc: 'Drawing')
| Initialize self. See help(type(self)) for accurate signature.
|
| __setitem__(self, key: 'str', value: 'str') -> 'None'
| Set self[`key`] to `value`.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from MetaData:
|
| discard(self, key: 'str') -> 'None'
| Remove `key`, does **not** raise an exception if `key` not exist.
|
| get(self, key: 'str', default: 'str' = '') -> 'str'
| Returns the value for `key`. Returns `default` if `key` not exist.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from MetaData:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class R2000MetaData(MetaData)
| R2000MetaData(doc: 'Drawing')
|
| Manage ezdxf metadata for DXF version R2000+ as DICTIONARY object in
| the rootdict.
|
| Method resolution order:
| R2000MetaData
| MetaData
| abc.ABC
| builtins.object
|
| Methods defined here:
|
| __contains__(self, key: 'str') -> 'bool'
| Returns `key` ``in`` self.
|
| __delitem__(self, key: 'str') -> 'None'
| Delete self[`key`].
|
| Raises:
| KeyError: `key` does not exist
|
| __getitem__(self, key: 'str') -> 'str'
| Returns the value for self[`key`].
|
| Raises:
| KeyError: `key` does not exist
|
| __init__(self, doc: 'Drawing')
| Initialize self. See help(type(self)) for accurate signature.
|
| __setitem__(self, key: 'str', value: 'str') -> 'None'
| Set self[`key`] to `value`.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from MetaData:
|
| discard(self, key: 'str') -> 'None'
| Remove `key`, does **not** raise an exception if `key` not exist.
|
| get(self, key: 'str', default: 'str' = '') -> 'str'
| Returns the value for `key`. Returns `default` if `key` not exist.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from MetaData:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
FUNCTIONS
custom_export(doc: 'Drawing', tagwriter: 'AbstractTagWriter')
Export a DXF document via a custom tag writer.
export_json_tags(doc: 'Drawing', compact=True) -> 'str'
Export a DXF document as JSON formatted tags.
The `compact` format is a list of ``[group-code, value]`` pairs where each pair is
a DXF tag. The group-code has to be an integer and the value has to be a string,
integer, float or list of floats for vertices.
The `verbose` format (`compact` is ``False``) is a list of ``[group-code, value]``
pairs where each pair is a 1:1 representation of a DXF tag. The group-code has to be
an integer and the value has to be a string.
ezdxf_marker_string()
info(doc: 'Drawing', verbose=False, content=False, fmt='ASCII') -> 'list[str]'
load_json_tags(data: 'Sequence[Any]') -> 'Drawing'
Load DXF document from JSON formatted tags.
The expected JSON format is a list of [group-code, value] pairs where each pair is
a DXF tag. The `compact` and the `verbose` format is supported.
Args:
data: JSON data structure as a sequence of [group-code, value] pairs
DATA
BLK_EXTERNAL = 16
BLK_XREF = 4
CONST_GUID = '{00000000-0000-0000-0000-000000000000}'
CONST_MARKER_STRING = '0.0 @ 2000-01-01T00:00:00.000000+00:00'
CREATED_BY_EZDXF = 'CREATED_BY_EZDXF'
Callable = typing.Callable
Deprecated alias to collections.abc.Callable.
Callable[[int], str] signifies a function that takes a single
parameter of type int and returns a str.
The subscription syntax must always be used with exactly two
values: the argument list and the return type.
The argument list must be a list of types, a ParamSpec,
Concatenate or ellipsis. The return type must be a single type.
There is no syntax to indicate optional or keyword arguments;
such function types are rarely used as callback types.
DXF12 = 'AC1009'
DXF13 = 'AC1012'
DXF14 = 'AC1014'
DXF2000 = 'AC1015'
DXF2007 = 'AC1021'
DXF2013 = 'AC1027'
EZDXF_META = 'EZDXF_META'
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
Iterator = typing.Iterator
A generic version of collections.abc.Iterator.
MAX_STR_LEN = 255
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
Sequence = typing.Sequence
A generic version of collections.abc.Sequence.
TYPE_CHECKING = False
Union = typing.Union
Union type; Union[X, Y] means either X or Y.
On Python 3.10 and higher, the | operator
can also be used to denote unions;
X | Y means the same thing to the type checker as Union[X, Y].
To define a union, use e.g. Union[int, str]. Details:
- The arguments must be types and there must be at least one.
- None as an argument is a special case and is replaced by
type(None).
- Unions of unions are flattened, e.g.::
assert Union[Union[int, str], float] == Union[int, str, float]
- Unions of a single argument vanish, e.g.::
assert Union[int] == int # The constructor actually returns int
- Redundant arguments are skipped, e.g.::
assert Union[int, str, int] == Union[int, str]
- When comparing unions, the argument order is ignored, e.g.::
assert Union[int, str] == Union[str, int]
- You cannot subclass or instantiate a union.
- You can use Optional[X] as a shorthand for Union[X, None].
WRITTEN_BY_EZDXF = 'WRITTEN_BY_EZDXF'
logger = <Logger ezdxf (WARNING)>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\document.py
ezdxf.dxf_backslash_replace
Python Library Documentation: function dxf_backslash_replace in module ezdxf.lldxf.encoding dxf_backslash_replace(exc: Exception)
ezdxf.entities
Python Library Documentation: package ezdxf.entities in ezdxf
NAME
ezdxf.entities
DESCRIPTION
# Copyright (c) 2011-2021 Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
acad_proxy_entity
acad_table
acad_xrec_roundtrip
acis
appdata
appid
arc
attrib
block
blockrecord
boundary_paths
circle
copy
dictionary
dimension
dimstyle
dimstyleoverride
dxfclass
dxfentity
dxfgfx
dxfgroups
dxfns
dxfobj
ellipse
factory
geodata
gradient
hatch
helix
idbuffer
image
insert
layer
layout
leader
light
line
ltype
lwpolyline
material
mesh
mleader
mline
mpolygon
mtext
mtext_columns
objectcollection
oleframe
pattern
point
polygon
polyline
shape
solid
spatial_filter
spline
subentity
sun
table
temporary_transform
text
textstyle
tolerance
ucs
underlay
view
viewport
visualstyle
vport
xdata
xdict
xline
DATA
DXF_DIMENSION_TYPES = {'ARC_DIMENSION', 'DIMENSION', 'LARGE_RADIAL_DIM...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\entities\__init__.py
ezdxf.entitydb
Python Library Documentation: module ezdxf.entitydb in ezdxf
NAME
ezdxf.entitydb
DESCRIPTION
# Copyright (c) 2019-2023, Manfred Moitzi
# License: MIT License
CLASSES
builtins.object
EntityDB
EntitySpace
class EntityDB(builtins.object)
| EntityDB() -> 'None'
|
| A simple key/entity database.
|
| Every entity/object, except tables and sections, are represented as
| DXFEntity or inherited types, these entities are stored in the
| DXF document database, database-key is the `handle` as string.
|
| Methods defined here:
|
| __contains__(self, handle: 'str') -> 'bool'
| ``True`` if database contains `handle`.
|
| __delitem__(self, handle: 'str') -> 'None'
| Delete entity by `handle`. Removes entity only from database, does
| not destroy the entity.
|
| __getitem__(self, handle: 'str') -> 'DXFEntity'
| Get entity by `handle`, does not filter destroyed entities nor
| entities in the trashcan.
|
| __init__(self) -> 'None'
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self) -> 'Iterator[str]'
| Iterable of all handles, does filter destroyed entities but not
| entities in the trashcan.
|
| __len__(self) -> 'int'
| Count of database items.
|
| __setitem__(self, handle: 'str', entity: 'DXFEntity') -> 'None'
| Set `entity` for `handle`.
|
| add(self, entity: 'DXFEntity') -> 'None'
| Add `entity` to database, assigns a new handle to the `entity`
| if :attr:`entity.dxf.handle` is ``None``. Adding the same entity
| multiple times is possible and creates only a single database entry.
|
| audit(self, auditor: 'Auditor')
| Restore database integrity:
|
| - restore database entries with modified handles (key != entity.dxf.handle)
| - remove entities with invalid handles
| - empty trashcan - destroy all entities in the trashcan
| - removes destroyed database entries (purge)
|
| delete_entity(self, entity: 'DXFEntity') -> 'None'
| Remove `entity` from database and destroy the `entity`.
|
| discard(self, entity: 'DXFEntity') -> 'None'
| Discard `entity` from database without destroying the `entity`.
|
| duplicate_entity(self, entity: 'DXFEntity') -> 'DXFEntity'
| Duplicates `entity` and its sub entities (VERTEX, ATTRIB, SEQEND)
| and store them with new handles in the entity database.
| Graphical entities have to be added to a layout by
| :meth:`~ezdxf.layouts.BaseLayout.add_entity`. DXF objects will
| automatically added to the OBJECTS section.
|
| A new owner handle will be set by adding the duplicated entity to a
| layout.
|
| Raises:
| CopyNotSupported: copying of `entity` is not supported
|
| dxf_types_in_use(self) -> 'set[str]'
|
| get(self, handle: 'str') -> 'Optional[DXFEntity]'
| Returns entity for `handle` or ``None`` if no entry exist, does
| not filter destroyed entities.
|
| items(self) -> 'Iterable[tuple[str, DXFEntity]]'
| Iterable of all (handle, entities) pairs, does filter destroyed
| entities.
|
| keys(self) -> 'Iterable[str]'
| Iterable of all handles, does filter destroyed entities.
|
| new_trashcan(self) -> 'EntityDB.Trashcan'
| Returns a new trashcan, empty trashcan manually by: :
| func:`Trashcan.clear()`.
|
| next_handle(self) -> 'str'
| Returns next unique handle.
|
| purge(self) -> 'None'
| Remove all destroyed entities from database, but does not empty the
| trashcan.
|
| query(self, query: 'str' = '*') -> 'EntityQuery'
| Entity query over all entities in the DXF document.
|
| Args:
| query: query string
|
| .. seealso::
|
| :ref:`entity query string` and :ref:`entity queries`
|
| reset_handle(self, entity: 'DXFEntity', handle: 'str') -> 'bool'
| Try to reset the entity handle to a certain value.
| Returns ``True`` if successful and ``False`` otherwise.
|
| trashcan(self) -> 'EntityDB.Trashcan'
| Returns a new trashcan in context manager mode, trashcan will be
| emptied when leaving context.
|
| values(self) -> 'Iterable[DXFEntity]'
| Iterable of all entities, does filter destroyed entities.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| Trashcan = <class 'ezdxf.entitydb.EntityDB.Trashcan'>
| Store handles to entities which should be deleted later.
class EntitySpace(builtins.object)
| EntitySpace(entities: 'Optional[Iterable[DXFEntity]]' = None)
|
| An :class:`EntitySpace` is a collection of :class:`~ezdxf.entities.DXFEntity`
| objects, that stores only references to :class:`DXFEntity` objects.
|
| The :class:`~ezdxf.layouts.Modelspace`, any :class:`~ezdxf.layouts.Paperspace`
| layout and :class:`~ezdxf.layouts.BlockLayout` objects have an
| :class:`EntitySpace` container to store their entities.
|
| Methods defined here:
|
| __getitem__(self, index) -> 'DXFEntity'
| Get entity at index `item`
|
| :class:`EntitySpace` has a standard Python list like interface,
| therefore `index` can be any valid list indexing or slicing term, like
| a single index ``layout[-1]`` to get the last entity, or an index slice
| ``layout[:10]`` to get the first 10 or fewer entities as
| ``list[DXFEntity]``. Does not filter destroyed entities.
|
| __init__(self, entities: 'Optional[Iterable[DXFEntity]]' = None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self) -> 'Iterator[DXFEntity]'
| Iterable of all entities, filters destroyed entities.
|
| __len__(self) -> 'int'
| Count of entities including destroyed entities.
|
| add(self, entity: 'DXFEntity') -> 'None'
| Add `entity`.
|
| audit(self, auditor: 'Auditor') -> 'None'
|
| clear(self) -> 'None'
| Remove all entities.
|
| export_dxf(self, tagwriter: 'AbstractTagWriter') -> 'None'
| Export all entities into DXF file by `tagwriter`.
|
| (internal API)
|
| extend(self, entities: 'Iterable[DXFEntity]') -> 'None'
| Add multiple `entities`.
|
| has_handle(self, handle: 'str') -> 'bool'
| ``True`` if `handle` is present, does filter destroyed entities.
|
| insert(self, index: 'int', entity: 'DXFEntity') -> 'None'
|
| pop(self, index: 'int' = -1) -> 'DXFEntity'
|
| purge(self)
| Remove all destroyed entities from entity space.
|
| remove(self, entity: 'DXFEntity') -> 'None'
| Remove `entity`.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
DATA
DATABASE_EXCLUDE = {'ACDSRECORD', 'ACDSSCHEMA', 'CLASS', 'ENDSEC', 'EN...
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
Iterator = typing.Iterator
A generic version of collections.abc.Iterator.
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
TYPE_CHECKING = False
default_copy = <ezdxf.entities.copy.CopyStrategy object>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\entitydb.py
ezdxf.enums
Python Library Documentation: module ezdxf.enums in ezdxf
NAME
ezdxf.enums
DESCRIPTION
# Copyright (c) 2021, Manfred Moitzi
# License: MIT License
CLASSES
enum.Enum(builtins.object)
TextEntityAlignment
enum.IntEnum(builtins.int, enum.ReprEnum)
ACI
AngularUnits
EndCaps
InsertUnits
JoinStyle
LengthUnits
MTextBackgroundColor
MTextEntityAlignment
MTextFlowDirection
MTextLineAlignment
MTextLineSpacing
MTextParagraphAlignment
Measurement
TextHAlign
TextVAlign
enum.IntFlag(builtins.int, enum.ReprEnum, enum.Flag)
MTextStroke
SortEntities
class ACI(enum.IntEnum)
| ACI(*values)
|
| AutoCAD Color Index
|
| Method resolution order:
| ACI
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| BLACK = <ACI.BLACK: 7>
|
| BLUE = <ACI.BLUE: 5>
|
| BYBLOCK = <ACI.BYBLOCK: 0>
|
| BYLAYER = <ACI.BYLAYER: 256>
|
| BYOBJECT = <ACI.BYOBJECT: 257>
|
| CYAN = <ACI.CYAN: 4>
|
| GRAY = <ACI.GRAY: 8>
|
| GREEN = <ACI.GREEN: 3>
|
| LIGHT_GRAY = <ACI.LIGHT_GRAY: 9>
|
| MAGENTA = <ACI.MAGENTA: 6>
|
| RED = <ACI.RED: 1>
|
| YELLOW = <ACI.YELLOW: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class AngularUnits(enum.IntEnum)
| AngularUnits(*values)
|
| Method resolution order:
| AngularUnits
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| DecimalDegrees = <AngularUnits.DecimalDegrees: 0>
|
| DegreesMinutesSeconds = <AngularUnits.DegreesMinutesSeconds: 1>
|
| Grad = <AngularUnits.Grad: 2>
|
| Radians = <AngularUnits.Radians: 3>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class EndCaps(enum.IntEnum)
| EndCaps(*values)
|
| Lineweight end caps setting for new objects.
|
| Method resolution order:
| EndCaps
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ANGLE = <EndCaps.ANGLE: 2>
|
| NONE = <EndCaps.NONE: 0>
|
| ROUND = <EndCaps.ROUND: 1>
|
| SQUARE = <EndCaps.SQUARE: 3>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class InsertUnits(enum.IntEnum)
| InsertUnits(*values)
|
| Method resolution order:
| InsertUnits
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| Angstroms = <InsertUnits.Angstroms: 11>
|
| AstronomicalUnits = <InsertUnits.AstronomicalUnits: 18>
|
| Centimeters = <InsertUnits.Centimeters: 5>
|
| Decameters = <InsertUnits.Decameters: 15>
|
| Decimeters = <InsertUnits.Decimeters: 14>
|
| Feet = <InsertUnits.Feet: 2>
|
| Gigameters = <InsertUnits.Gigameters: 17>
|
| Hectometers = <InsertUnits.Hectometers: 16>
|
| Inches = <InsertUnits.Inches: 1>
|
| Kilometers = <InsertUnits.Kilometers: 7>
|
| Lightyears = <InsertUnits.Lightyears: 19>
|
| Meters = <InsertUnits.Meters: 6>
|
| Microinches = <InsertUnits.Microinches: 8>
|
| Microns = <InsertUnits.Microns: 13>
|
| Miles = <InsertUnits.Miles: 3>
|
| Millimeters = <InsertUnits.Millimeters: 4>
|
| Mils = <InsertUnits.Mils: 9>
|
| Nanometers = <InsertUnits.Nanometers: 12>
|
| Parsecs = <InsertUnits.Parsecs: 20>
|
| USSurveyFeet = <InsertUnits.USSurveyFeet: 21>
|
| USSurveyInch = <InsertUnits.USSurveyInch: 22>
|
| USSurveyMile = <InsertUnits.USSurveyMile: 24>
|
| USSurveyYard = <InsertUnits.USSurveyYard: 23>
|
| Unitless = <InsertUnits.Unitless: 0>
|
| Yards = <InsertUnits.Yards: 10>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class JoinStyle(enum.IntEnum)
| JoinStyle(*values)
|
| Lineweight joint setting for new objects.
|
| Method resolution order:
| JoinStyle
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ANGLE = <JoinStyle.ANGLE: 2>
|
| FLAT = <JoinStyle.FLAT: 3>
|
| NONE = <JoinStyle.NONE: 0>
|
| ROUND = <JoinStyle.ROUND: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class LengthUnits(enum.IntEnum)
| LengthUnits(*values)
|
| Method resolution order:
| LengthUnits
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| Architectural = <LengthUnits.Architectural: 4>
|
| Decimal = <LengthUnits.Decimal: 2>
|
| Engineering = <LengthUnits.Engineering: 3>
|
| Fractional = <LengthUnits.Fractional: 5>
|
| Scientific = <LengthUnits.Scientific: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class MTextBackgroundColor(enum.IntEnum)
| MTextBackgroundColor(*values)
|
| Method resolution order:
| MTextBackgroundColor
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CANVAS = <MTextBackgroundColor.CANVAS: 3>
|
| COLOR = <MTextBackgroundColor.COLOR: 1>
|
| OFF = <MTextBackgroundColor.OFF: 0>
|
| WINDOW = <MTextBackgroundColor.WINDOW: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class MTextEntityAlignment(enum.IntEnum)
| MTextEntityAlignment(*values)
|
| Text alignment enum for the :class:`~ezdxf.entities.MText` entity.
|
| Method resolution order:
| MTextEntityAlignment
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| BOTTOM_CENTER = <MTextEntityAlignment.BOTTOM_CENTER: 8>
|
| BOTTOM_LEFT = <MTextEntityAlignment.BOTTOM_LEFT: 7>
|
| BOTTOM_RIGHT = <MTextEntityAlignment.BOTTOM_RIGHT: 9>
|
| MIDDLE_CENTER = <MTextEntityAlignment.MIDDLE_CENTER: 5>
|
| MIDDLE_LEFT = <MTextEntityAlignment.MIDDLE_LEFT: 4>
|
| MIDDLE_RIGHT = <MTextEntityAlignment.MIDDLE_RIGHT: 6>
|
| TOP_CENTER = <MTextEntityAlignment.TOP_CENTER: 2>
|
| TOP_LEFT = <MTextEntityAlignment.TOP_LEFT: 1>
|
| TOP_RIGHT = <MTextEntityAlignment.TOP_RIGHT: 3>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class MTextFlowDirection(enum.IntEnum)
| MTextFlowDirection(*values)
|
| Method resolution order:
| MTextFlowDirection
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| BY_STYLE = <MTextFlowDirection.BY_STYLE: 5>
|
| LEFT_TO_RIGHT = <MTextFlowDirection.LEFT_TO_RIGHT: 1>
|
| TOP_TO_BOTTOM = <MTextFlowDirection.TOP_TO_BOTTOM: 3>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class MTextLineAlignment(enum.IntEnum)
| MTextLineAlignment(*values)
|
| Method resolution order:
| MTextLineAlignment
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| BOTTOM = <MTextLineAlignment.BOTTOM: 0>
|
| MIDDLE = <MTextLineAlignment.MIDDLE: 1>
|
| TOP = <MTextLineAlignment.TOP: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class MTextLineSpacing(enum.IntEnum)
| MTextLineSpacing(*values)
|
| Method resolution order:
| MTextLineSpacing
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| AT_LEAST = <MTextLineSpacing.AT_LEAST: 1>
|
| EXACT = <MTextLineSpacing.EXACT: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class MTextParagraphAlignment(enum.IntEnum)
| MTextParagraphAlignment(*values)
|
| Method resolution order:
| MTextParagraphAlignment
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CENTER = <MTextParagraphAlignment.CENTER: 3>
|
| DEFAULT = <MTextParagraphAlignment.DEFAULT: 0>
|
| DISTRIBUTED = <MTextParagraphAlignment.DISTRIBUTED: 5>
|
| JUSTIFIED = <MTextParagraphAlignment.JUSTIFIED: 4>
|
| LEFT = <MTextParagraphAlignment.LEFT: 1>
|
| RIGHT = <MTextParagraphAlignment.RIGHT: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class MTextStroke(enum.IntFlag)
| MTextStroke(*values)
|
| Combination of flags is supported: UNDERLINE + STRIKE_THROUGH
|
| Method resolution order:
| MTextStroke
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| OVERLINE = <MTextStroke.OVERLINE: 4>
|
| STRIKE_THROUGH = <MTextStroke.STRIKE_THROUGH: 2>
|
| UNDERLINE = <MTextStroke.UNDERLINE: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntFlag:
|
| __repr__(self) from enum.Flag
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class Measurement(enum.IntEnum)
| Measurement(*values)
|
| Method resolution order:
| Measurement
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| Imperial = <Measurement.Imperial: 0>
|
| Metric = <Measurement.Metric: 1>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class SortEntities(enum.IntFlag)
| SortEntities(*values)
|
| Method resolution order:
| SortEntities
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| MSLIDE = <SortEntities.MSLIDE: 8>
|
| PLOT = <SortEntities.PLOT: 32>
|
| POSTSCRIPT = <SortEntities.POSTSCRIPT: 64>
|
| REDRAW = <SortEntities.REDRAW: 4>
|
| REGEN = <SortEntities.REGEN: 16>
|
| SELECTION = <SortEntities.SELECTION: 1>
|
| SNAP = <SortEntities.SNAP: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntFlag:
|
| __repr__(self) from enum.Flag
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class TextEntityAlignment(enum.Enum)
| TextEntityAlignment(*values)
|
| Text alignment enum for the :class:`~ezdxf.entities.Text`,
| :class:`~ezdxf.entities.Attrib` and :class:`~ezdxf.entities.AttDef`
| entities.
|
| Method resolution order:
| TextEntityAlignment
| enum.Enum
| builtins.object
|
| Data and other attributes defined here:
|
| ALIGNED = <TextEntityAlignment.ALIGNED: 4>
|
| BOTTOM_CENTER = <TextEntityAlignment.BOTTOM_CENTER: 8>
|
| BOTTOM_LEFT = <TextEntityAlignment.BOTTOM_LEFT: 7>
|
| BOTTOM_RIGHT = <TextEntityAlignment.BOTTOM_RIGHT: 9>
|
| CENTER = <TextEntityAlignment.CENTER: 2>
|
| FIT = <TextEntityAlignment.FIT: 6>
|
| LEFT = <TextEntityAlignment.LEFT: 1>
|
| MIDDLE = <TextEntityAlignment.MIDDLE: 5>
|
| MIDDLE_CENTER = <TextEntityAlignment.MIDDLE_CENTER: 11>
|
| MIDDLE_LEFT = <TextEntityAlignment.MIDDLE_LEFT: 10>
|
| MIDDLE_RIGHT = <TextEntityAlignment.MIDDLE_RIGHT: 12>
|
| RIGHT = <TextEntityAlignment.RIGHT: 3>
|
| TOP_CENTER = <TextEntityAlignment.TOP_CENTER: 14>
|
| TOP_LEFT = <TextEntityAlignment.TOP_LEFT: 13>
|
| TOP_RIGHT = <TextEntityAlignment.TOP_RIGHT: 15>
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class TextHAlign(enum.IntEnum)
| TextHAlign(*values)
|
| Enumeration for DXF attribute: :attr:`ezdxf.entities.Text.dxf.halign`
|
| Method resolution order:
| TextHAlign
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ALIGNED = <TextHAlign.ALIGNED: 3>
|
| CENTER = <TextHAlign.CENTER: 1>
|
| FIT = <TextHAlign.FIT: 5>
|
| LEFT = <TextHAlign.LEFT: 0>
|
| MIDDLE = <TextHAlign.MIDDLE: 4>
|
| RIGHT = <TextHAlign.RIGHT: 2>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class TextVAlign(enum.IntEnum)
| TextVAlign(*values)
|
| Enumeration for DXF attribute: :attr:`ezdxf.entities.Text.dxf.valign`
|
| Method resolution order:
| TextVAlign
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| BASELINE = <TextVAlign.BASELINE: 0>
|
| BOTTOM = <TextVAlign.BOTTOM: 1>
|
| MIDDLE = <TextVAlign.MIDDLE: 2>
|
| TOP = <TextVAlign.TOP: 3>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
DATA
MAP_FLAGS_TO_STRING_ALIGN = {(<TextHAlign.LEFT: 0>, <TextVAlign.BASELI...
MAP_MTEXT_ALIGN_TO_FLAGS = {<MTextEntityAlignment.TOP_LEFT: 1>: (<Text...
MAP_STRING_ALIGN_TO_FLAGS = {'ALIGNED': (<TextHAlign.ALIGNED: 3>, <Tex...
MAP_TEXT_ALIGN_FLAGS_TO_ENUM = {(<TextHAlign.LEFT: 0>, <TextVAlign.BAS...
MAP_TEXT_ENUM_TO_ALIGN_FLAGS = {<TextEntityAlignment.LEFT: 1>: (<TextH...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\enums.py
ezdxf.explode
Python Library Documentation: module ezdxf.explode in ezdxf
NAME
ezdxf.explode
DESCRIPTION
# Copyright (c) 2020-2023, Manfred Moitzi
# License: MIT License
FUNCTIONS
attrib_to_text(attrib: 'Attrib') -> 'Text'
explode_block_reference(block_ref: 'Insert', target_layout: 'BaseLayout', *, redraw_order=False, copy_strategy=<ezdxf.entities.copy.CopyStrategy object at 0x0000024618114500>) -> 'EntityQuery'
Explode a block reference into DXF primitives.
Transforms the block entities into the required WCS location by applying the
block reference attributes `insert`, `extrusion`, `rotation` and the scaling
values `xscale`, `yscale` and `zscale`.
Returns an EntityQuery() container with all exploded DXF entities.
Attached ATTRIB entities are converted to TEXT entities, this is the
behavior of the BURST command of the AutoCAD Express Tools.
This method does not apply the clipping path created by the XCLIP command.
The method returns all entities and ignores the clipping path polygon and no
entity is clipped.
Args:
block_ref: Block reference entity (INSERT)
target_layout: explicit target layout for exploded DXF entities
redraw_order: create entities in ascending redraw order if ``True``
copy_strategy: customizable copy strategy
.. warning::
**Non uniform scaling** may lead to incorrect results for text entities
(TEXT, MTEXT, ATTRIB) and maybe some other entities.
(internal API)
explode_entity(entity: 'DXFGraphic', target_layout: 'Optional[BaseLayout]' = None) -> 'EntityQuery'
Explode parts of an entity as primitives into target layout, if target
layout is ``None``, the target layout is the layout of the source entity.
Returns an :class:`~ezdxf.query.EntityQuery` container with all DXF parts.
Args:
entity: DXF entity to explode, has to have a :meth:`virtual_entities()`
method
target_layout: target layout for DXF parts, ``None`` for same layout as
source entity
(internal API)
virtual_block_reference_entities(block_ref: 'Insert', *, skipped_entity_callback: 'Optional[Callable[[DXFGraphic, str], None]]' = None, redraw_order=False, copy_strategy=<ezdxf.entities.copy.CopyStrategy object at 0x0000024618114500>) -> 'Iterable[DXFGraphic]'
Yields 'virtual' parts of block reference `block_ref`.
This method is meant to examine the block reference entities without the need to
explode the block reference. The `skipped_entity_callback()` will be called for all
entities which are not processed, signature:
:code:`skipped_entity_callback(entity: DXFGraphic, reason: str)`,
`entity` is the original (untransformed) DXF entity of the block definition,
the `reason` string is an explanation why the entity was skipped.
These entities are located at the 'exploded' positions, but are not stored in
the entity database, have no handle and are not assigned to any layout.
This method does not apply the clipping path created by the XCLIP command.
The method returns all entities and ignores the clipping path polygon and no
entity is clipped.
Args:
block_ref: Block reference entity (INSERT)
skipped_entity_callback: called whenever the transformation of an entity
is not supported and so was skipped.
redraw_order: yield entities in ascending redraw order if ``True``
copy_strategy: customizable copy strategy
.. warning::
**Non uniform scaling** may lead to incorrect results for text entities
(TEXT, MTEXT, ATTRIB) and maybe some other entities.
(internal API)
virtual_boundary_path_entities(polygon: 'DXFPolygon') -> 'list[list[DXFGraphic]]'
DATA
__all__ = ['virtual_block_reference_entities', 'virtual_boundary_path_...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\explode.py
ezdxf.filemanagement
Python Library Documentation: module ezdxf.filemanagement in ezdxf
NAME
ezdxf.filemanagement
DESCRIPTION
# Copyright (C) 2018-2023, Manfred Moitzi
# License: MIT License
FUNCTIONS
decode_base64(data: 'bytes', errors: 'str' = 'surrogateescape') -> 'Drawing'
Load a DXF document from base64 encoded binary data, like uploaded data
to web applications.
Args:
data: DXF document base64 encoded binary data
errors: specify decoding error handler
- "surrogateescape" to preserve possible binary data (default)
- "ignore" to use the replacement char U+FFFD "�" for invalid data
- "strict" to raise an :class:`UnicodeDecodeError` exception for invalid data
Raises:
DXFStructureError: for invalid or corrupted DXF structures
UnicodeDecodeError: if `errors` is "strict" and a decoding error occurs
dxf_file_info(filename: 'str | os.PathLike') -> 'DXFInfo'
Reads basic file information from a DXF document: DXF version, encoding
and handle seed.
dxf_stream_info(stream: 'TextIO') -> 'DXFInfo'
Reads basic DXF information from a text stream: DXF version, encoding
and handle seed.
find_support_file(filename: 'str', support_dirs: 'Optional[Sequence[str]]' = None) -> 'str'
Find file `filename` in the support directories`.
new(dxfversion: 'str' = 'AC1027', setup: 'Union[str, bool, Sequence[str]]' = False, units: 'int' = 6) -> 'Drawing'
Create a new :class:`~ezdxf.drawing.Drawing` from scratch, `dxfversion`
can be either "AC1009" the official DXF version name or "R12" the
AutoCAD release name.
:func:`new` can create drawings for following DXF versions:
======= ========================
Version AutoCAD Release
======= ========================
AC1009 AutoCAD R12
AC1015 AutoCAD R2000
AC1018 AutoCAD R2004
AC1021 AutoCAD R2007
AC1024 AutoCAD R2010
AC1027 AutoCAD R2013
AC1032 AutoCAD R2018
======= ========================
The `units` argument defines th document and modelspace units. The header
variable $MEASUREMENT will be set according to the given `units`, 0 for
inch, feet, miles, ... and 1 for metric units. For more information go to
module :mod:`ezdxf.units`
Args:
dxfversion: DXF version specifier as string, default is "AC1027"
respectively "R2013"
setup: setup default styles, ``False`` for no setup,
``True`` to setup everything or a list of topics as strings,
e.g. ["linetypes", "styles"] to setup only some topics:
================== ========================================
Topic Description
================== ========================================
linetypes setup line types
styles setup text styles
dimstyles setup default `ezdxf` dimension styles
visualstyles setup 25 standard visual styles
================== ========================================
units: document and modelspace units, default is 6 for meters
read(stream: 'TextIO') -> 'Drawing'
Read a DXF document from a text-stream. Open stream in text mode
(``mode='rt'``) and set correct text encoding, the stream requires at least
a :meth:`readline` method.
Since DXF version R2007 (AC1021) file encoding is always "utf-8",
use the helper function :func:`dxf_stream_info` to detect the required
text encoding for prior DXF versions. To preserve possible binary data in
use :code:`errors='surrogateescape'` as error handler for the import stream.
If this function struggles to load the DXF document and raises a
:class:`DXFStructureError` exception, try the :func:`ezdxf.recover.read`
function to load this corrupt DXF document.
Args:
stream: input text stream opened with correct encoding
Raises:
DXFStructureError: for invalid or corrupted DXF structures
readfile(filename: 'str | os.PathLike', encoding: 'Optional[str]' = None, errors: 'str' = 'surrogateescape') -> 'Drawing'
Read the DXF document `filename` from the file-system.
This is the preferred method to load existing ASCII or Binary DXF files,
the required text encoding will be detected automatically and decoding
errors will be ignored.
Override encoding detection by setting argument `encoding` to the
estimated encoding. (use Python encoding names like in the :func:`open`
function).
If this function struggles to load the DXF document and raises a
:class:`DXFStructureError` exception, try the :func:`ezdxf.recover.readfile`
function to load this corrupt DXF document.
Args:
filename: filename of the ASCII- or Binary DXF document
encoding: use ``None`` for auto detect (default), or set a specific
encoding like "utf-8", argument is ignored for Binary DXF files
errors: specify decoding error handler
- "surrogateescape" to preserve possible binary data (default)
- "ignore" to use the replacement char U+FFFD "�" for invalid data
- "strict" to raise an :class:`UnicodeDecodeError` exception for invalid data
Raises:
IOError: not a DXF file or file does not exist
DXFStructureError: for invalid or corrupted DXF structures
UnicodeDecodeError: if `errors` is "strict" and a decoding error occurs
readzip(zipfile: 'str | os.PathLike', filename: 'Optional[str]' = None, errors: 'str' = 'surrogateescape') -> 'Drawing'
Load a DXF document specified by `filename` from a zip archive, or if
`filename` is ``None`` the first DXF document in the zip archive.
Args:
zipfile: name of the zip archive
filename: filename of DXF file, or ``None`` to load the first DXF
document from the zip archive.
errors: specify decoding error handler
- "surrogateescape" to preserve possible binary data (default)
- "ignore" to use the replacement char U+FFFD "�" for invalid data
- "strict" to raise an :class:`UnicodeDecodeError` exception for invalid data
Raises:
IOError: not a DXF file or file does not exist or
if `filename` is ``None`` - no DXF file found
DXFStructureError: for invalid or corrupted DXF structures
UnicodeDecodeError: if `errors` is "strict" and a decoding error occurs
DATA
DXF2013 = 'AC1027'
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
Sequence = typing.Sequence
A generic version of collections.abc.Sequence.
TYPE_CHECKING = False
Union = typing.Union
Union type; Union[X, Y] means either X or Y.
On Python 3.10 and higher, the | operator
can also be used to denote unions;
X | Y means the same thing to the type checker as Union[X, Y].
To define a union, use e.g. Union[int, str]. Details:
- The arguments must be types and there must be at least one.
- None as an argument is a special case and is replaced by
type(None).
- Unions of unions are flattened, e.g.::
assert Union[Union[int, str], float] == Union[int, str, float]
- Unions of a single argument vanish, e.g.::
assert Union[int] == int # The constructor actually returns int
- Redundant arguments are skipped, e.g.::
assert Union[int, str, int] == Union[int, str]
- When comparing unions, the argument order is ignored, e.g.::
assert Union[int, str] == Union[str, int]
- You cannot subclass or instantiate a union.
- You can use Optional[X] as a shorthand for Union[X, None].
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\filemanagement.py
ezdxf.float2transparency
Python Library Documentation: function float2transparency in module ezdxf.colors
float2transparency(value: 'float') -> 'int'
Returns DXF transparency value as integer in the range from 0 to 255,
where 0 is 100% transparent and 255 is opaque.
Args:
value: transparency value as float in the range from 0 to 1, where 0 is
opaque and 1 is 100% transparent.
ezdxf.fonts
Python Library Documentation: package ezdxf.fonts in ezdxf
NAME
ezdxf.fonts
DESCRIPTION
# Copyright (c) 2023, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
font_face
font_manager
font_measurements
font_synonyms
fonts
glyphs
lff
shapefile
ttfonts
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\fonts\__init__.py
ezdxf.graphicsfactory
Python Library Documentation: module ezdxf.graphicsfactory in ezdxf
NAME
ezdxf.graphicsfactory
DESCRIPTION
# Copyright (c) 2013-2023, Manfred Moitzi
# License: MIT License
CLASSES
builtins.object
CreatorInterface
class CreatorInterface(builtins.object)
| CreatorInterface(doc: 'Drawing')
|
| Methods defined here:
|
| __init__(self, doc: 'Drawing')
| Initialize self. See help(type(self)) for accurate signature.
|
| add_3dface(self, points: 'Iterable[UVec]', dxfattribs=None) -> 'Face3d'
| Add a :class:`~ezdxf.entities.3DFace` entity, `points` is an iterable
| 3 or 4 2D/3D points.
|
| .. hint::
|
| In contrast to SOLID and TRACE, the last two vertices are in
| regular order: a square has the vertex order 0-1-2-3
|
| Args:
| points: iterable of 3 or 4 2D/3D points in :ref:`WCS`
| dxfattribs: additional DXF attributes
|
| add_3dsolid(self, dxfattribs=None) -> 'Solid3d'
| Add a 3DSOLID entity (:class:`~ezdxf.entities.Solid3d`).
| (requires DXF R2000 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_aligned_dim(self, p1: 'UVec', p2: 'UVec', distance: 'float', text: 'str' = '<>', dimstyle: 'str' = 'EZDXF', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add linear dimension aligned with measurement points `p1` and `p2`. If
| an :class:`~ezdxf.math.UCS` is used for dimension line rendering, all
| point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector
| is defined by UCS or (0, 0, 1) by default.
| See also: :ref:`tut_linear_dimension`
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object,
| to create the necessary dimension geometry, you have to call
| :meth:`DimStyleOverride.render` manually, this two-step process allows
| additional processing steps on the :class:`~ezdxf.entities.Dimension`
| entity between creation and rendering.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| p1: measurement point 1 and start point of extension line 1 (in UCS)
| p2: measurement point 2 and start point of extension line 2 (in UCS)
| distance: distance of dimension line from measurement points
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZDXF"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_angular_dim_2l(self, base: 'UVec', line1: 'tuple[UVec, UVec]', line2: 'tuple[UVec, UVec]', *, location: 'Optional[UVec]' = None, text: 'str' = '<>', text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZ_CURVED', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add angular :class:`~ezdxf.entities.Dimension` from two lines. The
| measurement is always done from `line1` to `line2` in counter-clockwise
| orientation. This does not always match the result in CAD applications!
|
| If an :class:`~ezdxf.math.UCS` is used for angular dimension rendering,
| all point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default.
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object -
| to create the necessary dimension geometry, you have to call
| :meth:`~ezdxf.entities.DimStyleOverride.render` manually, this two-step
| process allows additional processing steps on the
| :class:`~ezdxf.entities.Dimension` entity between creation and rendering.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| base: location of dimension line, any point on the dimension line or
| its extension is valid (in UCS)
| line1: specifies start leg of the angle (start point, end point) and
| determines extension line 1 (in UCS)
| line2: specifies end leg of the angle (start point, end point) and
| determines extension line 2 (in UCS)
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_CURVED"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_angular_dim_3p(self, base: 'UVec', center: 'UVec', p1: 'UVec', p2: 'UVec', *, location: 'Optional[UVec]' = None, text: 'str' = '<>', text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZ_CURVED', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add angular :class:`~ezdxf.entities.Dimension` from three points
| (center, p1, p2). The measurement is always done from `p1` to `p2` in
| counter-clockwise orientation. This does not always match the result in
| CAD applications!
|
| If an :class:`~ezdxf.math.UCS` is used for angular dimension rendering,
| all point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default.
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object -
| to create the necessary dimension geometry, you have to call
| :meth:`~ezdxf.entities.DimStyleOverride.render` manually, this two-step
| process allows additional processing steps on the
| :class:`~ezdxf.entities.Dimension` entity between creation and rendering.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| base: location of dimension line, any point on the dimension line
| or its extension is valid (in UCS)
| center: specifies the vertex of the angle
| p1: specifies start leg of the angle (center -> p1) and end-point
| of extension line 1 (in UCS)
| p2: specifies end leg of the angle (center -> p2) and end-point
| of extension line 2 (in UCS)
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_CURVED"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_angular_dim_arc(self, arc: 'ConstructionArc', distance: 'float', *, location: 'Optional[UVec]' = None, text: 'str' = '<>', text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZ_CURVED', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut method to create an angular dimension from a
| :class:`~ezdxf.math.ConstructionArc`. This construction tool can
| be created from ARC entities and the tool itself provides various
| construction class methods.
| The measurement text is placed at the default location defined by the
| associated `dimstyle`.
| The measurement is always done from `start_angle` to `end_angle` of the
| arc in counter-clockwise orientation.
| This does not always match the result in CAD applications!
| For further information see the more generic factory method
| :func:`add_angular_dim_3p`.
|
| Args:
| arc: :class:`~ezdxf.math.ConstructionArc`
| distance: distance from start of the extension lines to the
| dimension line in drawing units
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_CURVED"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_angular_dim_cra(self, center: 'UVec', radius: 'float', start_angle: 'float', end_angle: 'float', distance: 'float', *, location: 'Optional[UVec]' = None, text: 'str' = '<>', text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZ_CURVED', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut method to create an angular dimension by (c)enter point,
| (r)adius and start- and end (a)ngles, the measurement text is placed at
| the default location defined by the associated `dimstyle`.
| The measurement is always done from `start_angle` to `end_angle` in
| counter-clockwise orientation. This does not always match the result in
| CAD applications!
| For further information see the more generic factory method
| :func:`add_angular_dim_3p`.
|
| Args:
| center: center point of the angle (in UCS)
| radius: the distance from `center` to the start of the extension
| lines in drawing units
| start_angle: start angle in degrees (in UCS)
| end_angle: end angle in degrees (in UCS)
| distance: distance from start of the extension lines to the
| dimension line in drawing units
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_CURVED"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_arc(self, center: 'UVec', radius: 'float', start_angle: 'float', end_angle: 'float', is_counter_clockwise: 'bool' = True, dxfattribs=None) -> 'Arc'
| Add an :class:`~ezdxf.entities.Arc` entity. The arc goes from
| `start_angle` to `end_angle` in counter-clockwise direction by default,
| set parameter `is_counter_clockwise` to ``False`` for clockwise
| orientation.
|
| Args:
| center: center of arc as 2D/3D point in :ref:`WCS`
| radius: arc radius
| start_angle: start angle in degrees
| end_angle: end angle in degrees
| is_counter_clockwise: ``False`` for clockwise orientation
| dxfattribs: additional DXF attributes
|
| add_arc_dim_3p(self, base: 'UVec', center: 'UVec', p1: 'UVec', p2: 'UVec', *, location: 'Optional[UVec]' = None, text: 'str' = '<>', text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZ_CURVED', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add :class:`~ezdxf.entities.ArcDimension` from three points
| (center, p1, p2). Point `p1` defines the radius and the start-angle of
| the arc, point `p2` only defines the end-angle of the arc.
|
| If an :class:`~ezdxf.math.UCS` is used for arc dimension rendering,
| all point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default.
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object -
| to create the necessary dimension geometry, you have to call
| :meth:`~ezdxf.entities.DimStyleOverride.render` manually, this two-step
| process allows additional processing steps on the
| :class:`~ezdxf.entities.ArcDimension` entity between creation and
| rendering.
|
| .. note::
|
| `Ezdxf` does not render the arc dimension like CAD applications and
| does not consider all DIMSTYLE variables, so the rendering results
| are **very** different from CAD applications.
|
| Args:
| base: location of dimension line, any point on the dimension line
| or its extension is valid (in UCS)
| center: specifies the vertex of the angle
| p1: specifies the radius (center -> p1) and the star angle of the
| arc, this is also the start point for the 1st extension line (in UCS)
| p2: specifies the end angle of the arc. The start 2nd extension line
| is defined by this angle and the radius defined by p1 (in UCS)
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_CURVED"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_arc_dim_arc(self, arc: 'ConstructionArc', distance: 'float', *, location: 'Optional[UVec]' = None, text: 'str' = '<>', text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZ_CURVED', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut method to create an arc dimension from a
| :class:`~ezdxf.math.ConstructionArc`. This construction tool can
| be created from ARC entities and the tool itself provides various
| construction class methods.
| The measurement text is placed at the default location defined by the
| associated `dimstyle`.
|
| .. note::
|
| `Ezdxf` does not render the arc dimension like CAD applications and
| does not consider all DIMSTYLE variables, so the rendering results
| are **very** different from CAD applications.
|
| Args:
| arc: :class:`~ezdxf.math.ConstructionArc`
| distance: distance from start of the extension lines to the
| dimension line in drawing units
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_CURVED"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_arc_dim_cra(self, center: 'UVec', radius: 'float', start_angle: 'float', end_angle: 'float', distance: 'float', *, location: 'Optional[UVec]' = None, text: 'str' = '<>', text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZ_CURVED', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut method to create an arc dimension by (c)enter point,
| (r)adius and start- and end (a)ngles, the measurement text is placed at
| the default location defined by the associated `dimstyle`.
|
| .. note::
|
| `Ezdxf` does not render the arc dimension like CAD applications and
| does not consider all DIMSTYLE variables, so the rendering results
| are **very** different from CAD applications.
|
| Args:
| center: center point of the angle (in UCS)
| radius: the distance from `center` to the start of the extension
| lines in drawing units
| start_angle: start-angle in degrees (in UCS)
| end_angle: end-angle in degrees (in UCS)
| distance: distance from start of the extension lines to the
| dimension line in drawing units
| location: user defined location for text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_CURVED"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_arrow(self, name: 'str', insert: 'UVec', size: 'float' = 1.0, rotation: 'float' = 0, dxfattribs=None) -> 'Vec3'
|
| add_arrow_blockref(self, name: 'str', insert: 'UVec', size: 'float' = 1.0, rotation: 'float' = 0, dxfattribs=None) -> 'Vec3'
|
| add_attdef(self, tag: 'str', insert: 'UVec' = (0, 0), text: 'str' = '', *, height: 'Optional[float]' = None, rotation: 'Optional[float]' = None, dxfattribs=None) -> 'AttDef'
| Add an :class:`~ezdxf.entities.AttDef` as stand alone DXF entity.
|
| Set position and alignment by the idiom::
|
| layout.add_attdef("NAME").set_placement(
| (2, 3), align=TextEntityAlignment.MIDDLE_CENTER
| )
|
| Args:
| tag: tag name as string
| insert: insert location as 2D/3D point in :ref:`WCS`
| text: tag value as string
| height: text height in drawing units
| rotation: text rotation in degrees
| dxfattribs: additional DXF attributes
|
| add_auto_blockref(self, name: 'str', insert: 'UVec', values: 'dict[str, str]', dxfattribs=None) -> 'Insert'
| Add an :class:`~ezdxf.entities.Insert` entity. This method adds for each
| :class:`~ezdxf.entities.Attdef` entity, defined in the block definition,
| automatically an :class:`Attrib` entity to the block reference and set
| (tag, value) DXF attributes of the ATTRIB entities by the (key, value)
| pairs (both as strings) of the `values` dict.
|
| The Attrib entities are placed relative to the insert point, which is
| equal to the block base point.
|
| This method wraps the INSERT and all the ATTRIB entities into an
| anonymous block, which produces the best visual results, especially for
| non-uniform scaled block references, because the transformation and
| scaling is done by the CAD application. But this makes evaluation of
| block references with attributes more complicated, if you prefer INSERT
| and ATTRIB entities without a wrapper block use the
| :meth:`add_blockref_with_attribs` method.
|
| Args:
| name: block name
| insert: insert location as 2D/3D point in :ref:`WCS`
| values: :class:`~ezdxf.entities.Attrib` tag values as (tag, value) pairs
| dxfattribs: additional DXF attributes
|
| add_blockref(self, name: 'str', insert: 'UVec', dxfattribs=None) -> 'Insert'
| Add an :class:`~ezdxf.entities.Insert` entity.
|
| When inserting a block reference into the modelspace or another block
| layout with different units, the scaling factor between these units
| should be applied as scaling attributes (:attr:`xscale`, ...) e.g.
| modelspace in meters and block in centimeters, :attr:`xscale` has to
| be 0.01.
|
| Args:
| name: block name as str
| insert: insert location as 2D/3D point in :ref:`WCS`
| dxfattribs: additional DXF attributes
|
| add_body(self, dxfattribs=None) -> 'Body'
| Add a :class:`~ezdxf.entities.Body` entity.
| (requires DXF R2000 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_cad_spline_control_frame(self, fit_points: 'Iterable[UVec]', tangents: 'Optional[Iterable[UVec]]' = None, dxfattribs=None) -> 'Spline'
| Add a :class:`~ezdxf.entities.Spline` entity passing through the
| given fit points. This method creates the same control points as CAD
| applications.
|
| Args:
| fit_points: iterable of fit points as (x, y[, z]) in :ref:`WCS`
| tangents: start- and end tangent, default is autodetect
| dxfattribs: additional DXF attributes
|
| add_circle(self, center: 'UVec', radius: 'float', dxfattribs=None) -> 'Circle'
| Add a :class:`~ezdxf.entities.Circle` entity. This is an 2D element,
| which can be placed in space by using :ref:`OCS`.
|
| Args:
| center: 2D/3D point in :ref:`WCS`
| radius: circle radius
| dxfattribs: additional DXF attributes
|
| add_diameter_dim(self, center: 'UVec', mpoint: 'Optional[UVec]' = None, radius: 'Optional[float]' = None, angle: 'Optional[float]' = None, *, location: 'Optional[UVec]' = None, text: 'str' = '<>', dimstyle: 'str' = 'EZ_RADIUS', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add a diameter :class:`~ezdxf.entities.Dimension` line. The diameter
| dimension line requires a `center` point and a point `mpoint` on the
| circle or as an alternative a `radius` and a dimension line `angle` in
| degrees.
|
| If an :class:`~ezdxf.math.UCS` is used for dimension line rendering,
| all point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default.
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object -
| to create the necessary dimension geometry, you have to call
| :meth:`~ezdxf.entities.DimStyleOverride.render` manually, this two-step
| process allows additional processing steps on the :class:`~ezdxf.entities.Dimension`
| entity between creation and rendering.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| center: specifies the center of the circle (in UCS)
| mpoint: specifies the measurement point on the circle (in UCS)
| radius: specify radius, requires argument `angle`, overrides `p1` argument
| angle: specify angle of dimension line in degrees, requires argument
| `radius`, overrides `p1` argument
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or ``"<>"`` the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_RADIUS"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_diameter_dim_2p(self, p1: 'UVec', p2: 'UVec', text: 'str' = '<>', dimstyle: 'str' = 'EZ_RADIUS', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut method to create a diameter dimension by two points on the
| circle and the measurement text at the default location defined by the
| associated `dimstyle`, for further information see general method
| :func:`add_diameter_dim`. Center point of the virtual circle is the
| midpoint between `p1` and `p2`.
|
| - dimstyle "EZ_RADIUS": places the dimension text outside
| - dimstyle "EZ_RADIUS_INSIDE": places the dimension text inside
|
| Args:
| p1: first point of the circle (in UCS)
| p2: second point on the opposite side of the center point of the
| circle (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_RADIUS"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_ellipse(self, center: 'UVec', major_axis: 'UVec' = (1, 0, 0), ratio: 'float' = 1, start_param: 'float' = 0, end_param: 'float' = 6.283185307179586, dxfattribs=None) -> 'Ellipse'
| Add an :class:`~ezdxf.entities.Ellipse` entity, `ratio` is the ratio of
| minor axis to major axis, `start_param` and `end_param` defines start
| and end point of the ellipse, a full ellipse goes from 0 to 2π.
| The ellipse goes from start to end param in `counter-clockwise`
| direction.
|
| Args:
| center: center of ellipse as 2D/3D point in :ref:`WCS`
| major_axis: major axis as vector (x, y, z)
| ratio: ratio of minor axis to major axis in range +/-[1e-6, 1.0]
| start_param: start of ellipse curve
| end_param: end param of ellipse curve
| dxfattribs: additional DXF attributes
|
| add_entity(self, entity: 'DXFGraphic') -> 'None'
|
| add_extruded_surface(self, dxfattribs=None) -> 'ExtrudedSurface'
| Add a :class:`~ezdxf.entities.ExtrudedSurface` entity.
| (requires DXF R2007 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_hatch(self, color: 'int' = 7, dxfattribs=None) -> 'Hatch'
| Add a :class:`~ezdxf.entities.Hatch` entity. (requires DXF R2000)
|
| Args:
| color: fill color as :ref`ACI`, default is 7 (black/white).
| dxfattribs: additional DXF attributes
|
| add_helix(self, radius: 'float', pitch: 'float', turns: 'float', ccw=True, dxfattribs=None) -> 'Helix'
| Add a :class:`~ezdxf.entities.Helix` entity.
|
| The center of the helix is always (0, 0, 0) and the helix axis direction
| is the +z-axis.
|
| Transform the new HELIX by the :meth:`~ezdxf.entities.DXFGraphic.transform`
| method to your needs.
|
| Args:
| radius: helix radius
| pitch: the height of one complete helix turn
| turns: count of turns
| ccw: creates a counter-clockwise turning (right-handed) helix if ``True``
| dxfattribs: additional DXF attributes
|
| add_image(self, image_def: 'ImageDef', insert: 'UVec', size_in_units: 'tuple[float, float]', rotation: 'float' = 0.0, dxfattribs=None) -> 'Image'
| Add an :class:`~ezdxf.entities.Image` entity, requires a
| :class:`~ezdxf.entities.ImageDef` entity, see :ref:`tut_image`.
| (requires DXF R2000)
|
| Args:
| image_def: required image definition as :class:`~ezdxf.entities.ImageDef`
| insert: insertion point as 3D point in :ref:`WCS`
| size_in_units: size as (x, y) tuple in drawing units
| rotation: rotation angle around the extrusion axis, default is the
| z-axis, in degrees
| dxfattribs: additional DXF attributes
|
| add_leader(self, vertices: 'Iterable[UVec]', dimstyle: 'str' = 'EZDXF', override: 'Optional[dict]' = None, dxfattribs=None) -> 'Leader'
| The :class:`~ezdxf.entities.Leader` entity represents an arrow, made up
| of one or more vertices (or spline fit points) and an arrowhead.
| The label or other content to which the :class:`~ezdxf.entities.Leader`
| is attached is stored as a separate entity, and is not part of the
| :class:`~ezdxf.entities.Leader` itself. (requires DXF R2000)
|
| :class:`~ezdxf.entities.Leader` shares its styling infrastructure with
| :class:`~ezdxf.entities.Dimension`.
|
| By default a :class:`~ezdxf.entities.Leader` without any annotation is
| created. For creating more fancy leaders and annotations see
| documentation provided by Autodesk or `Demystifying DXF: LEADER and MULTILEADER
| implementation notes <https://atlight.github.io/formats/dxf-leader.html>`_ .
|
|
| Args:
| vertices: leader vertices (in :ref:`WCS`)
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZDXF"
| override: override :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes
|
| add_line(self, start: 'UVec', end: 'UVec', dxfattribs=None) -> 'Line'
| Add a :class:`~ezdxf.entities.Line` entity from `start` to `end`.
|
| Args:
| start: 2D/3D point in :ref:`WCS`
| end: 2D/3D point in :ref:`WCS`
| dxfattribs: additional DXF attributes
|
| add_linear_dim(self, base: 'UVec', p1: 'UVec', p2: 'UVec', location: 'Optional[UVec]' = None, text: 'str' = '<>', angle: 'float' = 0, text_rotation: 'Optional[float]' = None, dimstyle: 'str' = 'EZDXF', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add horizontal, vertical and rotated :class:`~ezdxf.entities.Dimension`
| line. If an :class:`~ezdxf.math.UCS` is used for dimension line rendering,
| all point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default.
| See also: :ref:`tut_linear_dimension`
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object -
| to create the necessary dimension geometry, you have to call
| :meth:`~ezdxf.entities.DimStyleOverride.render` manually, this two-step
| process allows additional processing steps on the
| :class:`~ezdxf.entities.Dimension` entity between creation and rendering.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| base: location of dimension line, any point on the dimension line or
| its extension will do (in UCS)
| p1: measurement point 1 and start point of extension line 1 (in UCS)
| p2: measurement point 2 and start point of extension line 2 (in UCS)
| location: user defined location for the text midpoint (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text, everything
| else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZDXF"
| angle: angle from ucs/wcs x-axis to dimension line in degrees
| text_rotation: rotation angle of the dimension text as absolute
| angle (x-axis=0, y-axis=90) in degrees
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_lofted_surface(self, dxfattribs=None) -> 'LoftedSurface'
| Add a :class:`~ezdxf.entities.LoftedSurface` entity.
| (requires DXF R2007 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_lwpolyline(self, points: 'Iterable[UVec]', format: 'str' = 'xyseb', *, close: 'bool' = False, dxfattribs=None) -> 'LWPolyline'
| Add a 2D polyline as :class:`~ezdxf.entities.LWPolyline` entity.
| A points are defined as (x, y, [start_width, [end_width, [bulge]]])
| tuples, but order can be redefined by the `format` argument. Set
| `start_width`, `end_width` to 0 to be ignored like
| (x, y, 0, 0, bulge).
|
| The :class:`~ezdxf.entities.LWPolyline` is defined as a single DXF
| entity and needs less disk space than a
| :class:`~ezdxf.entities.Polyline` entity. (requires DXF R2000)
|
| Format codes:
|
| - ``x`` = x-coordinate
| - ``y`` = y-coordinate
| - ``s`` = start width
| - ``e`` = end width
| - ``b`` = bulge value
| - ``v`` = (x, y [,z]) tuple (z-axis is ignored)
|
| Args:
| points: iterable of (x, y, [start_width, [end_width, [bulge]]]) tuples
| format: user defined point format, default is "xyseb"
| close: ``True`` for a closed polyline
| dxfattribs: additional DXF attributes
|
| add_mesh(self, dxfattribs=None) -> 'Mesh'
| Add a :class:`~ezdxf.entities.Mesh` entity. (requires DXF R2007)
|
| Args:
| dxfattribs: additional DXF attributes
|
| add_mline(self, vertices: 'Optional[Iterable[UVec]]' = None, *, close: 'bool' = False, dxfattribs=None) -> 'MLine'
| Add a :class:`~ezdxf.entities.MLine` entity
|
| Args:
| vertices: MLINE vertices (in :ref:`WCS`)
| close: ``True`` to add a closed MLINE
| dxfattribs: additional DXF attributes
|
| add_mpolygon(self, color: 'int' = 256, fill_color: 'Optional[int]' = None, dxfattribs=None) -> 'MPolygon'
| Add a :class:`~ezdxf.entities.MPolygon` entity. (requires DXF R2000)
|
| The MPOLYGON entity is not a core DXF entity and is not supported by
| every CAD application or DXF library.
|
| DXF version R2004+ is required to use a fill color different from
| BYLAYER. For R2000 the fill color is always BYLAYER, set any ACI value
| to create a filled MPOLYGON entity.
|
| Args:
| color: boundary color as :ref:`ACI`, default is BYLAYER.
| fill_color: fill color as :ref:`ACI`, default is ``None``
| dxfattribs: additional DXF attributes
|
| add_mtext(self, text: 'str', dxfattribs=None) -> 'MText'
| Add a multiline text entity with automatic text wrapping at boundaries
| as :class:`~ezdxf.entities.MText` entity.
| (requires DXF R2000)
|
| Args:
| text: content string
| dxfattribs: additional DXF attributes
|
| add_mtext_dynamic_auto_height_columns(self, content: 'str', width: 'float', gutter_width: 'float', height: 'float', count: 'int', dxfattribs=None) -> 'MText'
| Add a multiline text entity with as many columns as needed for the
| given common fixed `height`. The content is spread across the columns
| automatically by the CAD application. The `height` argument also defines
| the total height of the MTEXT entity. To get the correct column `count`
| requires an **exact** MTEXT rendering like AutoCAD, which is
| not done by `ezdxf`, therefore passing the expected column `count`
| is required to calculate the correct total width.
|
| This current implementation works best for DXF R2018, because the
| content is stored as a continuous text in a single MTEXT entity. For
| DXF versions prior to R2018 the content should be distributed across
| multiple MTEXT entities (one entity per column), which is not done by
| `ezdxf`, but the result is correct for advanced DXF viewers and CAD
| application, which do the MTEXT content distribution completely by
| itself.
|
| Because of the current limitations the use of this method is not
| recommend. This situation may improve in future releases, but the exact
| rendering of the content will also slow down the processing speed
| dramatically.
|
| (requires DXF R2000)
|
| Args:
| content: column content as a single string
| width: column width
| gutter_width: distance between columns
| height: max. column height
| count: expected column count
| dxfattribs: additional DXF attributes
|
| add_mtext_dynamic_manual_height_columns(self, content: 'str', width: 'float', gutter_width: 'float', heights: 'Sequence[float]', dxfattribs=None) -> 'MText'
| Add a multiline text entity with dynamic columns as
| :class:`~ezdxf.entities.MText` entity. The content is spread
| across the columns automatically by the CAD application.
| The `heights` sequence determine the height of the columns, except for
| the last column, which always takes the remaining content. The height
| value for the last column is required but can be 0, because the value
| is ignored. The count of `heights` also determines the count of columns,
| and :code:`max(heights)` defines the total height of the MTEXT entity,
| which may be wrong if the last column requires more space.
|
| This current implementation works best for DXF R2018, because the
| content is stored as a continuous text in a single MTEXT entity. For
| DXF versions prior to R2018 the content should be distributed across
| multiple MTEXT entities (one entity per column), which is not done by
| `ezdxf`, but the result is correct for advanced DXF viewers and CAD
| application, which do the MTEXT content distribution completely by
| itself.
|
| (requires DXF R2000)
|
| Args:
| content: column content as a single string
| width: column width
| gutter_width: distance between columns
| heights: column height for each column
| dxfattribs: additional DXF attributes
|
| add_mtext_static_columns(self, content: 'Iterable[str]', width: 'float', gutter_width: 'float', height: 'float', dxfattribs=None) -> 'MText'
| Add a multiline text entity with static columns as
| :class:`~ezdxf.entities.MText` entity. The content is spread
| across the columns, the count of content strings determine the count
| of columns.
|
| This factory method adds automatically a column break ``"\N"`` at the
| end of each column text to force a new column.
| The `height` attribute should be big enough to reserve enough space for
| the tallest column. Too small values produce valid DXF files, but the
| visual result will not be as expected. The `height` attribute also
| defines the total height of the MTEXT entity.
|
| (requires DXF R2000)
|
| Args:
| content: iterable of column content
| width: column width
| gutter_width: distance between columns
| height: max. column height
| dxfattribs: additional DXF attributes
|
| add_multi_point_linear_dim(self, base: 'UVec', points: 'Iterable[UVec]', angle: 'float' = 0, ucs: 'Optional[UCS]' = None, avoid_double_rendering: 'bool' = True, dimstyle: 'str' = 'EZDXF', override: 'Optional[dict]' = None, dxfattribs=None, discard=False) -> 'None'
| Add multiple linear dimensions for iterable `points`. If an
| :class:`~ezdxf.math.UCS` is used for dimension line rendering, all point
| definitions in UCS coordinates, translation into :ref:`WCS` and
| :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default. See also:
| :ref:`tut_linear_dimension`
|
| This method sets many design decisions by itself, the necessary geometry
| will be generated automatically, no required nor possible
| :meth:`~ezdxf.entities.DimStyleOverride.render` call.
| This method is easy to use, but you get what you get.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| base: location of dimension line, any point on the dimension line
| or its extension will do (in UCS)
| points: iterable of measurement points (in UCS)
| angle: angle from ucs/wcs x-axis to dimension line in degrees
| (0 = horizontal, 90 = vertical)
| ucs: user defined coordinate system
| avoid_double_rendering: suppresses the first extension line and the
| first arrow if possible for continued dimension entities
| dimstyle: dimension style name (DimStyle table entry),
| default is "EZDXF"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
| discard: discard rendering result for friendly CAD applications like
| BricsCAD to get a native and likely better rendering result.
| (does not work with AutoCAD)
|
| add_multileader_block(self, style: 'str' = 'Standard', dxfattribs=None) -> 'MultiLeaderBlockBuilder'
| Add a :class:`~ezdxf.entities.MultiLeader` entity but returns
| a :class:`~ezdxf.render.MultiLeaderBlockBuilder`.
|
| add_multileader_mtext(self, style: 'str' = 'Standard', dxfattribs=None) -> 'MultiLeaderMTextBuilder'
| Add a :class:`~ezdxf.entities.MultiLeader` entity but returns
| a :class:`~ezdxf.render.MultiLeaderMTextBuilder`.
|
| add_open_spline(self, control_points: 'Iterable[UVec]', degree: 'int' = 3, knots: 'Optional[Iterable[float]]' = None, dxfattribs=None) -> 'Spline'
| Add an open uniform :class:`~ezdxf.entities.Spline` defined by
| `control_points`. (requires DXF R2000)
|
| Open uniform B-splines start and end at your first and last control point.
|
| Args:
| control_points: iterable of 3D points in :ref:`WCS`
| degree: degree of B-spline, max. degree supported by AutoCAD is 11
| knots: knot values as iterable of floats
| dxfattribs: additional DXF attributes
|
| add_ordinate_dim(self, feature_location: 'UVec', offset: 'UVec', dtype: 'int', *, origin: 'UVec' = Vec3(0.0, 0.0, 0.0), rotation: 'float' = 0.0, text: 'str' = '<>', dimstyle: 'str' = 'EZDXF', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add an ordinate type :class:`~ezdxf.entities.Dimension` line. The
| feature location is defined in the global coordinate system, which is
| set as render UCS, which is the :ref:`WCS` by default.
|
| If an :class:`~ezdxf.math.UCS` is used for dimension line rendering,
| all point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default.
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object -
| to create the necessary dimension geometry, you have to call
| :meth:`~ezdxf.entities.DimStyleOverride.render` manually, this two-step
| process allows additional processing steps on the
| :class:`~ezdxf.entities.Dimension` entity between creation and rendering.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| feature_location: feature location in the global coordinate system (UCS)
| offset: offset vector of leader end point from the feature location
| in the local coordinate system
| dtype: 1 = x-type, 0 = y-type
| origin: specifies the origin (0, 0) of the local coordinate
| system in UCS
| rotation: rotation angle of the local coordinate system in degrees
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZDXF"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_ordinate_x_dim(self, feature_location: 'UVec', offset: 'UVec', *, origin: 'UVec' = Vec3(0.0, 0.0, 0.0), rotation: 'float' = 0.0, text: 'str' = '<>', dimstyle: 'str' = 'EZDXF', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut to add an x-type feature ordinate DIMENSION, for more
| information see :meth:`add_ordinate_dim`.
|
| add_ordinate_y_dim(self, feature_location: 'UVec', offset: 'UVec', *, origin: 'UVec' = Vec3(0.0, 0.0, 0.0), rotation: 'float' = 0.0, text: 'str' = '<>', dimstyle: 'str' = 'EZDXF', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut to add a y-type feature ordinate DIMENSION, for more
| information see :meth:`add_ordinate_dim`.
|
| add_point(self, location: 'UVec', dxfattribs=None) -> 'Point'
| Add a :class:`~ezdxf.entities.Point` entity at `location`.
|
| Args:
| location: 2D/3D point in :ref:`WCS`
| dxfattribs: additional DXF attributes
|
| add_polyface(self, dxfattribs=None) -> 'Polyface'
| Add a :class:`~ezdxf.entities.Polyface` entity, which is a wrapper
| class for the POLYLINE entity.
|
| Args:
| dxfattribs: additional DXF attributes for
| :class:`~ezdxf.entities.Polyline` entity
|
| add_polyline2d(self, points: 'Iterable[UVec]', format: 'Optional[str]' = None, *, close: 'bool' = False, dxfattribs=None) -> 'Polyline'
| Add a 2D :class:`~ezdxf.entities.Polyline` entity.
|
| Args:
| points: iterable of 2D points in :ref:`WCS`
| close: ``True`` for a closed polyline
| format: user defined point format like :meth:`add_lwpolyline`,
| default is ``None``
| dxfattribs: additional DXF attributes
|
| add_polyline3d(self, points: 'Iterable[UVec]', *, close: 'bool' = False, dxfattribs=None) -> 'Polyline'
| Add a 3D :class:`~ezdxf.entities.Polyline` entity.
|
| Args:
| points: iterable of 3D points in :ref:`WCS`
| close: ``True`` for a closed polyline
| dxfattribs: additional DXF attributes
|
| add_polymesh(self, size: 'tuple[int, int]' = (3, 3), dxfattribs=None) -> 'Polymesh'
| Add a :class:`~ezdxf.entities.Polymesh` entity, which is a wrapper class
| for the POLYLINE entity. A polymesh is a grid of `mcount` x `ncount`
| vertices and every vertex has its own (x, y, z)-coordinates.
|
| Args:
| size: 2-tuple (`mcount`, `ncount`)
| dxfattribs: additional DXF attributes
|
| add_radius_dim(self, center: 'UVec', mpoint: 'Optional[UVec]' = None, radius: 'Optional[float]' = None, angle: 'Optional[float]' = None, *, location: 'Optional[UVec]' = None, text: 'str' = '<>', dimstyle: 'str' = 'EZ_RADIUS', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Add a radius :class:`~ezdxf.entities.Dimension` line. The radius
| dimension line requires a `center` point and a point `mpoint` on the
| circle or as an alternative a `radius` and a dimension line `angle` in
| degrees. See also: :ref:`tut_radius_dimension`
|
| If a :class:`~ezdxf.math.UCS` is used for dimension line rendering,
| all point definitions in UCS coordinates, translation into :ref:`WCS`
| and :ref:`OCS` is done by the rendering function. Extrusion vector is
| defined by UCS or (0, 0, 1) by default.
|
| This method returns a :class:`~ezdxf.entities.DimStyleOverride` object -
| to create the necessary dimension geometry, you have to call
| :meth:`~ezdxf.entities.DimStyleOverride.render` manually, this two-step
| process allows additional processing steps on the
| :class:`~ezdxf.entities.Dimension` entity between creation and rendering.
|
| Following render types are supported:
|
| - Default text location outside: text aligned with dimension line;
| dimension style: "EZ_RADIUS"
| - Default text location outside horizontal: "EZ_RADIUS" + dimtoh=1
| - Default text location inside: text aligned with dimension line;
| dimension style: "EZ_RADIUS_INSIDE"
| - Default text location inside horizontal: "EZ_RADIUS_INSIDE" + dimtih=1
| - User defined text location: argument `location` != ``None``, text
| aligned with dimension line; dimension style: "EZ_RADIUS"
| - User defined text location horizontal: argument `location` != ``None``,
| "EZ_RADIUS" + dimtoh=1 for text outside horizontal, "EZ_RADIUS"
| + dimtih=1 for text inside horizontal
|
| Placing the dimension text at a user defined `location`, overrides the
| `mpoint` and the `angle` argument, but requires a given `radius`
| argument. The `location` argument does not define the exact text
| location, instead it defines the dimension line starting at `center`
| and the measurement text midpoint projected on this dimension line
| going through `location`, if text is aligned to the dimension line.
| If text is horizontal, `location` is the kink point of the dimension
| line from radial to horizontal direction.
|
| .. note::
|
| `Ezdxf` does not consider all DIMSTYLE variables, so the
| rendering results are different from CAD applications.
|
| Args:
| center: center point of the circle (in UCS)
| mpoint: measurement point on the circle, overrides `angle` and
| `radius` (in UCS)
| radius: radius in drawing units, requires argument `angle`
| angle: specify angle of dimension line in degrees, requires
| argument `radius`
| location: user defined dimension text location, overrides `mpoint`
| and `angle`, but requires `radius` (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_RADIUS"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_radius_dim_2p(self, center: 'UVec', mpoint: 'UVec', *, text: 'str' = '<>', dimstyle: 'str' = 'EZ_RADIUS', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut method to create a radius dimension by center point,
| measurement point on the circle and the measurement text at the default
| location defined by the associated `dimstyle`, for further information
| see general method :func:`add_radius_dim`.
|
| - dimstyle "EZ_RADIUS": places the dimension text outside
| - dimstyle "EZ_RADIUS_INSIDE": places the dimension text inside
|
| Args:
| center: center point of the circle (in UCS)
| mpoint: measurement point on the circle (in UCS)
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_RADIUS"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_radius_dim_cra(self, center: 'UVec', radius: 'float', angle: 'float', *, text: 'str' = '<>', dimstyle: 'str' = 'EZ_RADIUS', override: 'Optional[dict]' = None, dxfattribs=None) -> 'DimStyleOverride'
| Shortcut method to create a radius dimension by (c)enter point,
| (r)adius and (a)ngle, the measurement text is placed at the default
| location defined by the associated `dimstyle`, for further information
| see general method :func:`add_radius_dim`.
|
| - dimstyle "EZ_RADIUS": places the dimension text outside
| - dimstyle "EZ_RADIUS_INSIDE": places the dimension text inside
|
| Args:
| center: center point of the circle (in UCS)
| radius: radius in drawing units
| angle: angle of dimension line in degrees
| text: ``None`` or "<>" the measurement is drawn as text,
| " " (a single space) suppresses the dimension text,
| everything else `text` is drawn as dimension text
| dimstyle: dimension style name (:class:`~ezdxf.entities.DimStyle`
| table entry), default is "EZ_RADIUS"
| override: :class:`~ezdxf.entities.DimStyleOverride` attributes
| dxfattribs: additional DXF attributes for the DIMENSION entity
|
| Returns: :class:`~ezdxf.entities.DimStyleOverride`
|
| add_rational_spline(self, control_points: 'Iterable[UVec]', weights: 'Sequence[float]', degree: 'int' = 3, knots: 'Optional[Iterable[float]]' = None, dxfattribs=None) -> 'Spline'
| Add an open rational uniform :class:`~ezdxf.entities.Spline` defined by
| `control_points`. (requires DXF R2000)
|
| `weights` has to be an iterable of floats, which defines the influence
| of the associated control point to the shape of the B-spline, therefore
| for each control point is one weight value required.
|
| Open rational uniform B-splines start and end at the first and last
| control point.
|
| Args:
| control_points: iterable of 3D points in :ref:`WCS`
| weights: weight values as iterable of floats
| degree: degree of B-spline, max. degree supported by AutoCAD is 11
| knots: knot values as iterable of floats
| dxfattribs: additional DXF attributes
|
| add_ray(self, start: 'UVec', unit_vector: 'UVec', dxfattribs=None) -> 'Ray'
| Add a :class:`~ezdxf.entities.Ray` that begins at `start` point and
| continues to infinity (construction line). (requires DXF R2000)
|
| Args:
| start: location 3D point in :ref:`WCS`
| unit_vector: 3D vector (x, y, z)
| dxfattribs: additional DXF attributes
|
| add_region(self, dxfattribs=None) -> 'Region'
| Add a :class:`~ezdxf.entities.Region` entity.
| (requires DXF R2000 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_revolved_surface(self, dxfattribs=None) -> 'RevolvedSurface'
| Add a :class:`~ezdxf.entities.RevolvedSurface` entity.
| (requires DXF R2007 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_shape(self, name: 'str', insert: 'UVec' = (0, 0), size: 'float' = 1.0, dxfattribs=None) -> 'Shape'
| Add a :class:`~ezdxf.entities.Shape` reference to an external stored shape.
|
| Args:
| name: shape name as string
| insert: insert location as 2D/3D point in :ref:`WCS`
| size: size factor
| dxfattribs: additional DXF attributes
|
| add_solid(self, points: 'Iterable[UVec]', dxfattribs=None) -> 'Solid'
| Add a :class:`~ezdxf.entities.Solid` entity, `points` is an iterable
| of 3 or 4 points.
|
| .. hint::
|
| The last two vertices are in reversed order: a square has the
| vertex order 0-1-3-2
|
| Args:
| points: iterable of 3 or 4 2D/3D points in :ref:`WCS`
| dxfattribs: additional DXF attributes
|
| add_spline(self, fit_points: 'Optional[Iterable[UVec]]' = None, degree: 'int' = 3, dxfattribs=None) -> 'Spline'
| Add a B-spline (:class:`~ezdxf.entities.Spline` entity) defined by
| the given `fit_points` - the control points and knot values are created
| by the CAD application, therefore it is not predictable how the rendered
| spline will look like, because for every set of fit points exists an
| infinite set of B-splines.
|
| If `fit_points` is ``None``, an "empty" spline will be created, all data
| has to be set by the user.
|
| The SPLINE entity requires DXF R2000.
|
| AutoCAD creates a spline through fit points by a global curve
| interpolation and an unknown method to estimate the direction of the
| start- and end tangent.
|
| .. seealso::
|
| - :ref:`tut_spline`
| - :func:`ezdxf.math.fit_points_to_cad_cv`
|
| Args:
| fit_points: iterable of fit points as ``(x, y[, z])`` in :ref:`WCS`,
| creates an empty :class:`~ezdxf.entities.Spline` if ``None``
| degree: degree of B-spline, max. degree supported by AutoCAD is 11
| dxfattribs: additional DXF attributes
|
| add_spline_control_frame(self, fit_points: 'Iterable[UVec]', degree: 'int' = 3, method: 'str' = 'chord', dxfattribs=None) -> 'Spline'
| Add a :class:`~ezdxf.entities.Spline` entity passing through the
| given `fit_points`, the control points are calculated by a global curve
| interpolation without start- and end tangent constrains.
| The new SPLINE entity is defined by control points and not by the fit
| points, therefore the SPLINE looks always the same, no matter which CAD
| application renders the SPLINE.
|
| - "uniform": creates a uniform t vector, from 0 to 1 evenly spaced, see
| `uniform`_ method
| - "distance", "chord": creates a t vector with values proportional to
| the fit point distances, see `chord length`_ method
| - "centripetal", "sqrt_chord": creates a t vector with values
| proportional to the fit point sqrt(distances), see `centripetal`_
| method
| - "arc": creates a t vector with values proportional to the arc length
| between fit points.
|
| Use function :meth:`add_cad_spline_control_frame` to create
| SPLINE entities from fit points similar to CAD application including
| start- and end tangent constraints.
|
| Args:
| fit_points: iterable of fit points as (x, y[, z]) in :ref:`WCS`
| degree: degree of B-spline, max. degree supported by AutoCAD is 11
| method: calculation method for parameter vector t
| dxfattribs: additional DXF attributes
|
| add_surface(self, dxfattribs=None) -> 'Surface'
| Add a :class:`~ezdxf.entities.Surface` entity.
| (requires DXF R2007 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_swept_surface(self, dxfattribs=None) -> 'SweptSurface'
| Add a :class:`~ezdxf.entities.SweptSurface` entity.
| (requires DXF R2007 or later)
|
| The ACIS data has to be set as :term:`SAT` or :term:`SAB`.
|
| add_text(self, text: 'str', *, height: 'Optional[float]' = None, rotation: 'Optional[float]' = None, dxfattribs=None) -> 'Text'
| Add a :class:`~ezdxf.entities.Text` entity, see also
| :class:`~ezdxf.entities.Textstyle`.
|
| Args:
| text: content string
| height: text height in drawing units
| rotation: text rotation in degrees
| dxfattribs: additional DXF attributes
|
| add_trace(self, points: 'Iterable[UVec]', dxfattribs=None) -> 'Trace'
| Add a :class:`~ezdxf.entities.Trace` entity, `points` is an iterable
| of 3 or 4 points.
|
| .. hint::
|
| The last two vertices are in reversed order: a square has the
| vertex order 0-1-3-2
|
| Args:
| points: iterable of 3 or 4 2D/3D points in :ref:`WCS`
| dxfattribs: additional DXF attributes
|
| add_underlay(self, underlay_def: 'UnderlayDefinition', insert: 'UVec' = (0, 0, 0), scale=(1, 1, 1), rotation: 'float' = 0.0, dxfattribs=None) -> 'Underlay'
| Add an :class:`~ezdxf.entities.Underlay` entity, requires a
| :class:`~ezdxf.entities.UnderlayDefinition` entity,
| see :ref:`tut_underlay`. (requires DXF R2000)
|
| Args:
| underlay_def: required underlay definition as :class:`~ezdxf.entities.UnderlayDefinition`
| insert: insertion point as 3D point in :ref:`WCS`
| scale: underlay scaling factor as (x, y, z) tuple or as single
| value for uniform scaling for x, y and z
| rotation: rotation angle around the extrusion axis, default is the
| z-axis, in degrees
| dxfattribs: additional DXF attributes
|
| add_wipeout(self, vertices: 'Iterable[UVec]', dxfattribs=None) -> 'Wipeout'
| Add a :class:`ezdxf.entities.Wipeout` entity, the masking area is
| defined by WCS `vertices`.
|
| This method creates only a 2D entity in the xy-plane of the layout,
| the z-axis of the input vertices are ignored.
|
| add_xline(self, start: 'UVec', unit_vector: 'UVec', dxfattribs=None) -> 'XLine'
| Add an infinity :class:`~ezdxf.entities.XLine` (construction line).
| (requires DXF R2000)
|
| Args:
| start: location 3D point in :ref:`WCS`
| unit_vector: 3D vector (x, y, z)
| dxfattribs: additional DXF attributes
|
| new_entity(self, type_: 'str', dxfattribs: 'dict') -> 'DXFGraphic'
| Create entity in drawing database and add entity to the entity space.
|
| Args:
| type_ : DXF type string, like "LINE", "CIRCLE" or "LWPOLYLINE"
| dxfattribs: DXF attributes for the new entity
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| dxfversion
|
| is_active_paperspace
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
DATA
ARROWS = <ezdxf.render.arrows._Arrows object>
DXF2000 = 'AC1015'
DXF2013 = 'AC1027'
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
LEADER_UNSUPPORTED_DIMSTYLE_ATTRIBS = {'dimblk', 'dimblk1', 'dimblk2'}
NULLVEC = Vec3(0.0, 0.0, 0.0)
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
Sequence = typing.Sequence
A generic version of collections.abc.Sequence.
TYPE_CHECKING = False
UVec = typing.Union[typing.Sequence[float], ezdxf.acc.vector.Vec2, ezd...
logger = <Logger ezdxf (WARNING)>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\graphicsfactory.py
ezdxf.groupby
Python Library Documentation: module ezdxf.groupby in ezdxf
NAME
ezdxf.groupby
DESCRIPTION
# Purpose: Grouping entities by DXF attributes or a key function.
# Copyright (c) 2017-2022, Manfred Moitzi
# License: MIT License
FUNCTIONS
groupby(entities: 'Iterable[DXFEntity]', dxfattrib: 'str' = '', key: 'Optional[KeyFunc]' = None) -> 'dict[Hashable, list[DXFEntity]]'
Groups a sequence of DXF entities by a DXF attribute like ``'layer'``,
returns a dict with `dxfattrib` values as key and a list of entities
matching this `dxfattrib`.
A `key` function can be used to combine some DXF attributes (e.g. layer and
color) and should return a hashable data type like a tuple of strings,
integers or floats, `key` function example::
def group_key(entity: DXFEntity):
return entity.dxf.layer, entity.dxf.color
For not suitable DXF entities return ``None`` to exclude this entity, in
this case it's not required, because :func:`groupby` catches
:class:`DXFAttributeError` exceptions to exclude entities, which do not
provide layer and/or color attributes, automatically.
Result dict for `dxfattrib` = ``'layer'`` may look like this::
{
'0': [ ... list of entities ],
'ExampleLayer1': [ ... ],
'ExampleLayer2': [ ... ],
...
}
Result dict for `key` = `group_key`, which returns a ``(layer, color)``
tuple, may look like this::
{
('0', 1): [ ... list of entities ],
('0', 3): [ ... ],
('0', 7): [ ... ],
('ExampleLayer1', 1): [ ... ],
('ExampleLayer1', 2): [ ... ],
('ExampleLayer1', 5): [ ... ],
('ExampleLayer2', 7): [ ... ],
...
}
All entity containers (modelspace, paperspace layouts and blocks) and the
:class:`~ezdxf.query.EntityQuery` object have a dedicated :meth:`groupby`
method.
Args:
entities: sequence of DXF entities to group by a DXF attribute or a
`key` function
dxfattrib: grouping DXF attribute like ``'layer'``
key: key function, which accepts a :class:`DXFEntity` as argument and
returns a hashable grouping key or ``None`` to ignore this entity
DATA
Hashable = typing.Hashable
A generic version of collections.abc.Hashable.
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
TYPE_CHECKING = False
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\groupby.py
ezdxf.has_dxf_unicode
Python Library Documentation: function has_dxf_unicode in module ezdxf.lldxf.encoding
has_dxf_unicode(s: str) -> bool
Returns ``True`` if string `s` contains ``\U+xxxx`` encoded characters.
ezdxf.int2rgb
Python Library Documentation: function int2rgb in module ezdxf.colors
int2rgb(value: 'int') -> 'RGB'
Split RGB integer `value` into (r, g, b) tuple.
ezdxf.is_dxf_file
Python Library Documentation: function is_dxf_file in module ezdxf.lldxf.validator
is_dxf_file(filename: 'str') -> 'bool'
Returns ``True`` if `filename` is an ASCII DXF file.
ezdxf.is_dxf_stream
Python Library Documentation: function is_dxf_stream in module ezdxf.lldxf.validator is_dxf_stream(stream: 'TextIO') -> 'bool'
ezdxf.layouts
Python Library Documentation: package ezdxf.layouts in ezdxf
NAME
ezdxf.layouts
DESCRIPTION
# Copyright (c) 2011-2022, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
base
blocklayout
layout
layouts
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\layouts\__init__.py
ezdxf.lldxf
Python Library Documentation: package ezdxf.lldxf in ezdxf
NAME
ezdxf.lldxf
DESCRIPTION
# Low Level DXF modules
# Copyright (c) 2011-2022, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
attributes
const
encoding
extendedtags
fileindex
hdrvars
loader
packedtags
repair
tagger
tags
tagwriter
types
validator
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\lldxf\__init__.py
ezdxf.math
Python Library Documentation: package ezdxf.math in ezdxf
NAME
ezdxf.math
DESCRIPTION
# Copyright (c) 2011-2024, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
_bezier3p
_bezier4p
_bspline
_construct
_ctypes
_mapbox_earcut
_matrix44
_vector
arc
bbox
bezier
bezier_interpolation
box
bspline
bulge
circle
clipping
clustering
construct2d
construct3d
cspline
curvetools
ellipse
eulerspiral
legacy
linalg
line
offset2d
parametrize
perlin
polyline
rtree
shape
transformtools
triangulation
ucs
FUNCTIONS
close_vectors(a: Iterable[Union[ezdxf.acc.vector.Vec2, ezdxf.acc.vector.Vec3]], b: Iterable[Union[Sequence[float], ezdxf.acc.vector.Vec2, ezdxf.acc.vector.Vec3]], *, rel_tol=1e-09, abs_tol=1e-12) -> bool
xround(value: float, rounding: float = 0.0) -> float
Extended rounding function.
The argument `rounding` defines the rounding limit:
======= ======================================
0 remove fraction
0.1 round next to x.1, x.2, ... x.0
0.25 round next to x.25, x.50, x.75 or x.00
0.5 round next to x.5 or x.0
1.0 round to a multiple of 1: remove fraction
2.0 round to a multiple of 2: xxx2, xxx4, xxx6 ...
5.0 round to a multiple of 5: xxx5 or xxx0
10.0 round to a multiple of 10: xx10, xx20, ...
======= ======================================
Args:
value: float value to round
rounding: rounding limit
DATA
ABS_TOL = 1e-12
AnyBezier = typing.Union[ezdxf.acc.bezier3p.Bezier3P, ezdxf.acc.bezier...
AnyVec = typing.Union[ezdxf.acc.vector.Vec2, ezdxf.acc.vector.Vec3]
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
NULLVEC = Vec3(0.0, 0.0, 0.0)
REL_TOL = 1e-09
TOLERANCE = 1e-10
UVec = typing.Union[typing.Sequence[float], ezdxf.acc.vector.Vec2, ezd...
X_AXIS = Vec3(1.0, 0.0, 0.0)
Y_AXIS = Vec3(0.0, 1.0, 0.0)
Z_AXIS = Vec3(0.0, 0.0, 1.0)
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\math\__init__.py
ezdxf.messenger
Python Library Documentation: module ezdxf.messenger in ezdxf
NAME
ezdxf.messenger
DESCRIPTION
# Copyright (c) 2024, Manfred Moitzi
# License: MIT License
CLASSES
builtins.object
Messenger
class Messenger(builtins.object)
| Messenger(doc: 'Drawing') -> 'None'
|
| Methods defined here:
|
| __init__(self, doc: 'Drawing') -> 'None'
| Initialize self. See help(type(self)) for accurate signature.
|
| broadcast(self, message_type: 'int', data: 'Any' = None) -> 'None'
| Broadcast a message to all entities in the entity database.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
DATA
TYPE_CHECKING = False
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\messenger.py
ezdxf.msgtypes
Python Library Documentation: module ezdxf.msgtypes in ezdxf
NAME
ezdxf.msgtypes
DESCRIPTION
# Copyright (c) 2014, Manfred Moitzi
# License: MIT License
# This module defines all message types for the internal messaging system:
# - ezdxf.messenger
# - DXFEntity.notify()
DATA
COMMIT_PENDING_CHANGES = 1
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\msgtypes.py
ezdxf.new
Python Library Documentation: function new in module ezdxf.filemanagement
new(dxfversion: 'str' = 'AC1027', setup: 'Union[str, bool, Sequence[str]]' = False, units: 'int' = 6) -> 'Drawing'
Create a new :class:`~ezdxf.drawing.Drawing` from scratch, `dxfversion`
can be either "AC1009" the official DXF version name or "R12" the
AutoCAD release name.
:func:`new` can create drawings for following DXF versions:
======= ========================
Version AutoCAD Release
======= ========================
AC1009 AutoCAD R12
AC1015 AutoCAD R2000
AC1018 AutoCAD R2004
AC1021 AutoCAD R2007
AC1024 AutoCAD R2010
AC1027 AutoCAD R2013
AC1032 AutoCAD R2018
======= ========================
The `units` argument defines th document and modelspace units. The header
variable $MEASUREMENT will be set according to the given `units`, 0 for
inch, feet, miles, ... and 1 for metric units. For more information go to
module :mod:`ezdxf.units`
Args:
dxfversion: DXF version specifier as string, default is "AC1027"
respectively "R2013"
setup: setup default styles, ``False`` for no setup,
``True`` to setup everything or a list of topics as strings,
e.g. ["linetypes", "styles"] to setup only some topics:
================== ========================================
Topic Description
================== ========================================
linetypes setup line types
styles setup text styles
dimstyles setup default `ezdxf` dimension styles
visualstyles setup 25 standard visual styles
================== ========================================
units: document and modelspace units, default is 6 for meters
ezdxf.npshapes
Python Library Documentation: module ezdxf.npshapes in ezdxf
NAME
ezdxf.npshapes
DESCRIPTION
# Copyright (c) 2023, Manfred Moitzi
# License: MIT License
CLASSES
builtins.Exception(builtins.BaseException)
NumpyShapesException
EmptyShapeError
NumpyShape2d(abc.ABC)
NumpyPath2d
NumpyPoints2d
NumpyShape3d(abc.ABC)
NumpyPoints3d
class EmptyShapeError(NumpyShapesException)
| Method resolution order:
| EmptyShapeError
| NumpyShapesException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors inherited from NumpyShapesException:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class NumpyPath2d(NumpyShape2d)
| NumpyPath2d(path: 'Optional[Path]') -> 'None'
|
| Represents a 2D path, the path control vertices and commands are stored as ndarray.
|
| This class cannot build paths from scratch and is therefore not a drop-in replacement
| for the :class:`ezdxf.path.Path` class. Operations like transform and reverse are
| done inplace to utilize the `numpy` capabilities. This behavior is different from the
| :class:`ezdxf.path.Path` class!!!
|
| Construct new paths by the :class:`Path` class and convert them to
| :class:`NumpyPath2d` instances::
|
| path = Path((0, 0))
| path.line_to((50, 70))
| ...
| path2d = NumpyPath2d(path)
|
| Method resolution order:
| NumpyPath2d
| NumpyShape2d
| abc.ABC
| builtins.object
|
| Methods defined here:
|
| __copy__ = clone(self) -> 'Self'
|
| __init__(self, path: 'Optional[Path]') -> 'None'
| Initialize self. See help(type(self)) for accurate signature.
|
| __len__(self) -> 'int'
|
| clockwise(self) -> 'Self'
| Apply clockwise orientation inplace.
|
| Raises:
| TypeError: can't detect orientation of a :term:`Multi-Path` object
|
| clone(self) -> 'Self'
|
| command_codes(self) -> 'list[int]'
| Internal API.
|
| commands(self) -> 'Iterator[PathElement]'
|
| control_vertices(self) -> 'list[Vec2]'
|
| counter_clockwise(self) -> 'Self'
| Apply counter-clockwise orientation inplace.
|
| Raises:
| TypeError: can't detect orientation of a :term:`Multi-Path` object
|
| extend(self, paths: 'Sequence[NumpyPath2d]') -> 'None'
| Extend an existing path by appending additional paths. The paths are
| connected by MOVE_TO commands if the end- and start point of sequential paths
| are not coincident (multi-path).
|
| flattening(self, distance: 'float', segments: 'int' = 4) -> 'Iterator[Vec2]'
| Flatten path to vertices as :class:`Vec2` instances.
|
| has_clockwise_orientation(self) -> 'bool'
| Returns ``True`` if 2D path has clockwise orientation.
|
| Raises:
| TypeError: can't detect orientation of a :term:`Multi-Path` object
|
| reverse(self) -> 'Self'
| Reverse path orientation inplace.
|
| sub_paths(self) -> 'list[Self]'
| Yield all sub-paths as :term:`Single-Path` objects.
|
| It's safe to call :meth:`sub_paths` on any path-type:
| :term:`Single-Path`, :term:`Multi-Path` and :term:`Empty-Path`.
|
| to_path(self) -> 'Path'
| Returns a new :class:`ezdxf.path.Path` instance.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_vertices(vertices: 'Iterable[Vec2 | Vec3]', close: 'bool' = False) -> 'Self'
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| concatenate(paths: 'Sequence[NumpyPath2d]') -> 'NumpyPath2d'
| Returns a new path of concatenated paths. The paths are connected by
| MOVE_TO commands if the end- and start point of sequential paths are not
| coincident (multi-path).
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| end
| Returns the end point as :class:`~ezdxf.math.Vec2` instance.
|
| has_curves
| Returns ``True`` if the path has any curve segments.
|
| has_lines
| Returns ``True`` if the path has any line segments.
|
| has_sub_paths
| Returns ``True`` if the path is a :term:`Multi-Path` object that
| contains multiple sub-paths.
|
| is_closed
| Returns ``True`` if the start point is close to the end point.
|
| start
| Returns the start point as :class:`~ezdxf.math.Vec2` instance.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {'_commands': 'npt.NDArray[CommandNumpyType]'}
|
| ----------------------------------------------------------------------
| Methods inherited from NumpyShape2d:
|
| bbox(self) -> 'BoundingBox2d'
| Returns the bounding box of all vertices.
|
| extents(self) -> 'tuple[Vec2, Vec2]'
| Returns the extents of the bounding box as tuple (extmin, extmax).
|
| np_vertices(self) -> 'npt.NDArray[VertexNumpyType]'
|
| to_list(self) -> 'list[list[float]]'
| Returns the shape vertices as list of lists
| e.g. [[1, 2], [3, 4], ...]
|
| to_tuples(self) -> 'list[tuple[float, float]]'
| Returns the shape vertices as list of 2-tuples
| e.g. [(1, 2), (3, 4), ...]
|
| transform_inplace(self, m: 'Matrix44') -> 'None'
| Transforms the vertices of the shape inplace.
|
| vertices(self) -> 'list[Vec2]'
| Returns the shape vertices as list of :class:`Vec2`
| e.g. [Vec2(1, 2), Vec2(3, 4), ...]
|
| ----------------------------------------------------------------------
| Data descriptors inherited from NumpyShape2d:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class NumpyPoints2d(NumpyShape2d)
| NumpyPoints2d(points: 'Optional[Iterable[Vec2 | Vec3]]') -> 'None'
|
| Represents an array of 2D points stored as a ndarray.
|
| Method resolution order:
| NumpyPoints2d
| NumpyShape2d
| abc.ABC
| builtins.object
|
| Methods defined here:
|
| __copy__ = clone(self) -> 'Self'
|
| __init__(self, points: 'Optional[Iterable[Vec2 | Vec3]]') -> 'None'
| Initialize self. See help(type(self)) for accurate signature.
|
| __len__(self) -> 'int'
|
| clone(self) -> 'Self'
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Methods inherited from NumpyShape2d:
|
| bbox(self) -> 'BoundingBox2d'
| Returns the bounding box of all vertices.
|
| extents(self) -> 'tuple[Vec2, Vec2]'
| Returns the extents of the bounding box as tuple (extmin, extmax).
|
| np_vertices(self) -> 'npt.NDArray[VertexNumpyType]'
|
| to_list(self) -> 'list[list[float]]'
| Returns the shape vertices as list of lists
| e.g. [[1, 2], [3, 4], ...]
|
| to_tuples(self) -> 'list[tuple[float, float]]'
| Returns the shape vertices as list of 2-tuples
| e.g. [(1, 2), (3, 4), ...]
|
| transform_inplace(self, m: 'Matrix44') -> 'None'
| Transforms the vertices of the shape inplace.
|
| vertices(self) -> 'list[Vec2]'
| Returns the shape vertices as list of :class:`Vec2`
| e.g. [Vec2(1, 2), Vec2(3, 4), ...]
|
| ----------------------------------------------------------------------
| Data descriptors inherited from NumpyShape2d:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class NumpyPoints3d(NumpyShape3d)
| NumpyPoints3d(points: 'Optional[Iterable[UVec]]') -> 'None'
|
| Represents an array of 3D points stored as a ndarray.
|
| Method resolution order:
| NumpyPoints3d
| NumpyShape3d
| abc.ABC
| builtins.object
|
| Methods defined here:
|
| __copy__ = clone(self) -> 'Self'
|
| __init__(self, points: 'Optional[Iterable[UVec]]') -> 'None'
| Initialize self. See help(type(self)) for accurate signature.
|
| __len__(self) -> 'int'
|
| clone(self) -> 'Self'
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| ----------------------------------------------------------------------
| Methods inherited from NumpyShape3d:
|
| bbox(self) -> 'BoundingBox'
| Returns the bounding box of all vertices.
|
| extents(self) -> 'tuple[Vec3, Vec3]'
| Returns the extents of the bounding box as tuple (extmin, extmax).
|
| np_vertices(self) -> 'npt.NDArray[VertexNumpyType]'
|
| transform_inplace(self, m: 'Matrix44') -> 'None'
| Transforms the vertices of the shape inplace.
|
| vertices(self) -> 'list[Vec3]'
| Returns the shape vertices as list of :class:`Vec3`.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from NumpyShape3d:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class NumpyShapesException(builtins.Exception)
| Method resolution order:
| NumpyShapesException
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
orient_paths(paths: 'list[NumpyPath2d]') -> 'list[NumpyPath2d]'
Returns a new list of paths, with outer paths oriented counter-clockwise and
holes oriented clockwise.
single_paths(paths: 'Iterable[NumpyPath2d]') -> 'list[NumpyPath2d]'
to_matplotlib_path(paths: 'Iterable[NumpyPath2d]', *, detect_holes=False)
Convert the given `paths` into a single :class:`matplotlib.path.Path`.
Matplotlib requires counter-clockwise oriented outside paths and clockwise oriented
holes. Set the `detect_holes` argument to ``True`` if this path orientation is not
yet satisfied.
to_qpainter_path(paths: 'Iterable[NumpyPath2d]')
Convert the given `paths` into a single :class:`QPainterPath`.
DATA
__all__ = ['NumpyPath2d', 'NumpyPoints2d', 'NumpyPoints3d', 'NumpyShap...
__annotations__ = {'CommandNumpyType': 'TypeAlias', 'VertexNumpyType':...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\npshapes.py
ezdxf.options
Python Library Documentation: Options in module ezdxf._options object class Options(builtins.object) | Options() -> 'None' | | Methods defined here: | | __init__(self) -> 'None' | Initialize self. See help(type(self)) for accurate signature. | | get(self, section: 'str', key: 'str', default: 'str' = '') -> 'str' | | get_bool(self, section: 'str', key: 'str', default: 'bool' = False) -> 'bool' | | get_float(self, section: 'str', key: 'str', default: 'float' = 0.0) -> 'float' | | get_int(self, section: 'str', key: 'str', default: 'int' = 0) -> 'int' | | preserve_proxy_graphics(self, state: 'bool' = True) -> 'None' | Enable/disable proxy graphic load/store support. | | print(self) | Print current configuration to `stdout`. | | read_file(self, filename: 'str') -> 'None' | Append content from config file `filename`, but does not reset the | configuration. | | reset(self) | | rewrite_cached_options(self) | | set(self, section: 'str', key: 'str', value: 'str') -> 'None' | | update_cached_options(self) -> 'None' | | write(self, fp: 'TextIO') -> 'None' | Write current configuration into given file object, the file object | must be a writeable text file with 'utf8' encoding. | | write_file(self, filename: 'str' = 'ezdxf.ini') -> 'None' | Write current configuration into file `filename`. | | write_home_config(self) | Write current configuration into file "~/.config/ezdxf/ezdxf.ini" or | "XDG_CONFIG_HOME/ezdxf/ezdxf.ini". | | ---------------------------------------------------------------------- | Static methods defined here: | | delete_default_config_files() | | xdg_path(xdg_var: 'str', directory: 'str') -> 'Path' | | ---------------------------------------------------------------------- | Readonly properties defined here: | | disable_c_ext | Disable C-extensions if ``True``. | | filter_invalid_xdata_group_codes | | loaded_config_files | | test_files | | test_files_path | | use_c_ext | Returns ``True`` if the C-extensions are in use. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | default_dimension_text_style | | load_proxy_graphics | | store_proxy_graphics | | support_dirs | | write_fixed_meta_data_for_testing | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | BROWSE_COMMAND = 'browse-command' | | CONFIG_VARS = ['EZDXF_DISABLE_C_EXT', 'EZDXF_TEST_FILES', 'EZDXF_CONFI... | | CORE = 'core' | | DRAW_COMMAND = 'draw-command' | | VIEW_COMMAND = 'view-command'
ezdxf.os
Python Library Documentation: module os
NAME
os - OS routines for NT or Posix depending on what system we're on.
MODULE REFERENCE
https://docs.python.org/3.12/library/os.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This exports:
- all functions from posix or nt, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix' or 'nt'
- os.curdir is a string representing the current directory (always '.')
- os.pardir is a string representing the parent directory (always '..')
- os.sep is the (or a most common) pathname separator ('/' or '\\')
- os.extsep is the extension separator (always '.')
- os.altsep is the alternate pathname separator (None or '/')
- os.pathsep is the component separator used in $PATH etc
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
- os.defpath is the default search path for executables
- os.devnull is the file path of the null device ('/dev/null', etc.)
Programs that import and use 'os' stand a better chance of being
portable between different platforms. Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
CLASSES
builtins.Exception(builtins.BaseException)
builtins.OSError
builtins.object
nt.DirEntry
builtins.tuple(builtins.object)
nt.times_result
nt.uname_result
stat_result
statvfs_result
terminal_size
class DirEntry(builtins.object)
| Methods defined here:
|
| __fspath__(self, /)
| Returns the path for the entry.
|
| __repr__(self, /)
| Return repr(self).
|
| inode(self, /)
| Return inode of the entry; cached per entry.
|
| is_dir(self, /, *, follow_symlinks=True)
| Return True if the entry is a directory; cached per entry.
|
| is_file(self, /, *, follow_symlinks=True)
| Return True if the entry is a file; cached per entry.
|
| is_junction(self, /)
| Return True if the entry is a junction; cached per entry.
|
| is_symlink(self, /)
| Return True if the entry is a symbolic link; cached per entry.
|
| stat(self, /, *, follow_symlinks=True)
| Return stat_result object for the entry; cached per entry.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| name
| the entry's base filename, relative to scandir() "path" argument
|
| path
| the entry's full path name; equivalent to os.path.join(scandir_path, entry.name)
error = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Built-in subclasses:
| BlockingIOError
| ChildProcessError
| ConnectionError
| FileExistsError
| ... and 7 other subclasses
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class stat_result(builtins.tuple)
| stat_result(iterable=(), /)
|
| stat_result: Result from stat, fstat, or lstat.
|
| This object may be accessed either as a tuple of
| (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)
| or via the attributes st_mode, st_ino, st_dev, st_nlink, st_uid, and so on.
|
| Posix/windows: If your platform supports st_blksize, st_blocks, st_rdev,
| or st_flags, they are available as attributes only.
|
| See os.stat for more information.
|
| Method resolution order:
| stat_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| st_atime
| time of last access
|
| st_atime_ns
| time of last access in nanoseconds
|
| st_birthtime
| time of creation
|
| st_birthtime_ns
| time of creation in nanoseconds
|
| st_ctime
| time of last change
|
| st_ctime_ns
| time of last change in nanoseconds
|
| st_dev
| device
|
| st_file_attributes
| Windows file attribute bits
|
| st_gid
| group ID of owner
|
| st_ino
| inode
|
| st_mode
| protection bits
|
| st_mtime
| time of last modification
|
| st_mtime_ns
| time of last modification in nanoseconds
|
| st_nlink
| number of hard links
|
| st_reparse_tag
| Windows reparse tag
|
| st_size
| total size, in bytes
|
| st_uid
| user ID of owner
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid',...
|
| n_fields = 20
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 3
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class statvfs_result(builtins.tuple)
| statvfs_result(iterable=(), /)
|
| statvfs_result: Result from statvfs or fstatvfs.
|
| This object may be accessed either as a tuple of
| (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),
| or via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.
|
| See os.statvfs for more information.
|
| Method resolution order:
| statvfs_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| f_bavail
|
| f_bfree
|
| f_blocks
|
| f_bsize
|
| f_favail
|
| f_ffree
|
| f_files
|
| f_flag
|
| f_frsize
|
| f_fsid
|
| f_namemax
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('f_bsize', 'f_frsize', 'f_blocks', 'f_bfree', 'f_bav...
|
| n_fields = 11
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class terminal_size(builtins.tuple)
| terminal_size(iterable=(), /)
|
| A tuple of (columns, lines) for holding terminal window size
|
| Method resolution order:
| terminal_size
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| columns
| width of the terminal window in characters
|
| lines
| height of the terminal window in characters
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('columns', 'lines')
|
| n_fields = 2
|
| n_sequence_fields = 2
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class times_result(builtins.tuple)
| times_result(iterable=(), /)
|
| times_result: Result from os.times().
|
| This object may be accessed either as a tuple of
| (user, system, children_user, children_system, elapsed),
| or via the attributes user, system, children_user, children_system,
| and elapsed.
|
| See os.times for more information.
|
| Method resolution order:
| times_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| children_system
| system time of children
|
| children_user
| user time of children
|
| elapsed
| elapsed time since an arbitrary point in the past
|
| system
| system time
|
| user
| user time
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('user', 'system', 'children_user', 'children_system'...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
class uname_result(builtins.tuple)
| uname_result(iterable=(), /)
|
| uname_result: Result from os.uname().
|
| This object may be accessed either as a tuple of
| (sysname, nodename, release, version, machine),
| or via the attributes sysname, nodename, release, version, and machine.
|
| See os.uname for more information.
|
| Method resolution order:
| uname_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| machine
| hardware identifier
|
| nodename
| name of machine on network (implementation-defined)
|
| release
| operating system release
|
| sysname
| operating system name
|
| version
| operating system version
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __match_args__ = ('sysname', 'nodename', 'release', 'version', 'machin...
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.tuple:
|
| __class_getitem__(...)
| See PEP 585
FUNCTIONS
_exit(status)
Exit to the system with specified status, without normal exit processing.
abort()
Abort the interpreter immediately.
This function 'dumps core' or otherwise fails in the hardest way possible
on the hosting operating system. This function never returns.
access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)
Use the real uid/gid to test for access to a path.
path
Path to be tested; can be string, bytes, or a path-like object.
mode
Operating-system mode bitfield. Can be F_OK to test existence,
or the inclusive-OR of R_OK, W_OK, and X_OK.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
effective_ids
If True, access will use the effective uid/gid instead of
the real uid/gid.
follow_symlinks
If False, and the last element of the path is a symbolic link,
access will examine the symbolic link itself instead of the file
the link points to.
dir_fd, effective_ids, and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
Note that most operations will use the effective uid/gid, therefore this
routine can be used in a suid/sgid environment to test if the invoking user
has the specified access to the path.
chdir(path)
Change the current working directory to the specified path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
chmod(path, mode, *, dir_fd=None, follow_symlinks=True)
Change the access permissions of a file.
path
Path to be modified. May always be specified as a str, bytes, or a path-like object.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
mode
Operating-system mode bitfield.
Be careful when using number literals for *mode*. The conventional UNIX notation for
numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in
Python.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
chmod will modify the symbolic link itself instead of the file
the link points to.
It is an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
dir_fd and follow_symlinks may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
close(fd)
Close a file descriptor.
closerange(fd_low, fd_high, /)
Closes all file descriptors in [fd_low, fd_high), ignoring errors.
cpu_count()
Return the number of CPUs in the system; return None if indeterminable.
This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``
device_encoding(fd)
Return a string describing the encoding of a terminal's file descriptor.
The file descriptor must be attached to a terminal.
If the device is not a terminal, return None.
dup(fd, /)
Return a duplicate of a file descriptor.
dup2(fd, fd2, inheritable=True)
Duplicate file descriptor.
execl(file, *args)
execl(file, *args)
Execute the executable file with argument list args, replacing the
current process.
execle(file, *args)
execle(file, *args, env)
Execute the executable file with argument list args and
environment env, replacing the current process.
execlp(file, *args)
execlp(file, *args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
execlpe(file, *args)
execlpe(file, *args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the current
process.
execv(path, argv, /)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
execve(path, argv, env)
Execute an executable path with arguments, replacing current process.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
execvp(file, args)
execvp(file, args)
Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
args may be a list or tuple of strings.
execvpe(file, args, env)
execvpe(file, args, env)
Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the
current process.
args may be a list or tuple of strings.
fdopen(fd, mode='r', buffering=-1, encoding=None, *args, **kwargs)
fsdecode(filename)
Decode filename (an os.PathLike, bytes, or str) from the filesystem
encoding with 'surrogateescape' error handler, return str unchanged. On
Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fsencode(filename)
Encode filename (an os.PathLike, bytes, or str) to the filesystem
encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).
fspath(path)
Return the file system path representation of the object.
If the object is str or bytes, then allow it to pass through as-is. If the
object defines __fspath__(), then return the result of that method. All other
types raise a TypeError.
fstat(fd)
Perform a stat system call on the given file descriptor.
Like stat(), but for an open file descriptor.
Equivalent to os.stat(fd).
fsync(fd)
Force write of fd to disk.
ftruncate(fd, length, /)
Truncate a file, specified by file descriptor, to a specific length.
get_blocking(fd, /)
Get the blocking mode of the file descriptor.
Return False if the O_NONBLOCK flag is set, True if the flag is cleared.
get_exec_path(env=None)
Returns the sequence of directories that will be searched for the
named executable (similar to a shell) when launching a process.
*env* must be an environment variable dict or None. If *env* is None,
os.environ will be used.
get_handle_inheritable(handle, /)
Get the close-on-exe flag of the specified file descriptor.
get_inheritable(fd, /)
Get the close-on-exe flag of the specified file descriptor.
get_terminal_size(...)
Return the size of the terminal window as (columns, lines).
The optional argument fd (default standard output) specifies
which file descriptor should be queried.
If the file descriptor is not connected to a terminal, an OSError
is thrown.
This function will only be defined if an implementation is
available for this system.
shutil.get_terminal_size is the high-level function which should
normally be used, os.get_terminal_size is the low-level implementation.
getcwd()
Return a unicode string representing the current working directory.
getcwdb()
Return a bytes string representing the current working directory.
getenv(key, default=None)
Get an environment variable, return None if it doesn't exist.
The optional second argument can specify an alternate default.
key, default and the result are str.
getlogin()
Return the actual login name.
getpid()
Return the current process id.
getppid()
Return the parent's process id.
If the parent process has already exited, Windows machines will still
return its id; others systems will return the id of the 'init' process (1).
isatty(fd, /)
Return True if the fd is connected to a terminal.
Return True if the file descriptor is an open file descriptor
connected to the slave end of a terminal.
kill(pid, signal, /)
Kill a process with a signal.
link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)
Create a hard link to a file.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
If follow_symlinks is False, and the last element of src is a symbolic
link, link will create a link to the symbolic link itself instead of the
file the link points to.
src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your
platform. If they are unavailable, using them will raise a
NotImplementedError.
listdir(path=None)
Return a list containing the names of the files in the directory.
path can be specified as either str, bytes, or a path-like object. If path is bytes,
the filenames returned will also be bytes; in all other circumstances
the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
the file descriptor must refer to a directory.
If this functionality is unavailable, using it raises NotImplementedError.
The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.
listdrives()
Return a list containing the names of drives in the system.
A drive name typically looks like 'C:\\'.
listmounts(volume)
Return a list containing mount points for a particular volume.
'volume' should be a GUID path as returned from os.listvolumes.
listvolumes()
Return a list containing the volumes in the system.
Volumes are typically represented as a GUID path.
lseek(fd, position, whence, /)
Set the position of a file descriptor. Return the new position.
fd
An open file descriptor, as returned by os.open().
position
Position, interpreted relative to 'whence'.
whence
The relative position to seek from. Valid values are:
- SEEK_SET: seek from the start of the file.
- SEEK_CUR: seek from the current file position.
- SEEK_END: seek from the end of the file.
The return value is the number of bytes relative to the beginning of the file.
lstat(path, *, dir_fd=None)
Perform a stat system call on the given path, without following symbolic links.
Like stat(), but do not follow symbolic links.
Equivalent to stat(path, follow_symlinks=False).
makedirs(name, mode=511, exist_ok=False)
makedirs(name [, mode=0o777][, exist_ok=False])
Super-mkdir; create a leaf directory and all intermediate ones. Works like
mkdir, except that any intermediate path segment (not just the rightmost)
will be created if it does not exist. If the target directory already
exists, raise an OSError if exist_ok is False. Otherwise no exception is
raised. This is recursive.
mkdir(path, mode=511, *, dir_fd=None)
Create a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
The mode argument is ignored on Windows. Where it is used, the current umask
value is first masked out.
open(path, flags, mode=511, *, dir_fd=None)
Open a file for low level IO. Returns a file descriptor (integer).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
pipe()
Create a pipe.
Returns a tuple of two file descriptors:
(read_fd, write_fd)
popen(cmd, mode='r', buffering=-1)
putenv(name, value, /)
Change or add an environment variable.
read(fd, length, /)
Read from a file descriptor. Returns a bytes object.
readlink(path, *, dir_fd=None)
Return a string representing the path to which the symbolic link points.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform. If it is unavailable,
using it will raise a NotImplementedError.
remove(path, *, dir_fd=None)
Remove a file (same as unlink()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
removedirs(name)
removedirs(name)
Super-rmdir; remove a leaf directory and all empty intermediate
ones. Works like rmdir except that, if the leaf directory is
successfully removed, directories corresponding to rightmost path
segments will be pruned away until either the whole path is
consumed or an error occurs. Errors during this latter phase are
ignored -- they generally mean that a directory was not empty.
rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
renames(old, new)
renames(old, new)
Super-rename; create directories as necessary and delete any left
empty. Works like rename, except creation of any intermediate
directories needed to make the new pathname good is attempted
first. After the rename, directories corresponding to rightmost
path segments of the old name will be pruned until either the
whole path is consumed or a nonempty directory is found.
Note: this function can fail with the new directory structure made
if you lack permissions needed to unlink the leaf directory or
file.
replace(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory, overwriting the destination.
If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.
rmdir(path, *, dir_fd=None)
Remove a directory.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
scandir(path=None)
Return an iterator of DirEntry objects for given path.
path can be specified as either str, bytes, or a path-like object. If path
is bytes, the names of yielded DirEntry objects will also be bytes; in
all other circumstances they will be str.
If path is None, uses the path='.'.
set_blocking(fd, blocking, /)
Set the blocking mode of the specified file descriptor.
Set the O_NONBLOCK flag if blocking is False,
clear the O_NONBLOCK flag otherwise.
set_handle_inheritable(handle, inheritable, /)
Set the inheritable flag of the specified handle.
set_inheritable(fd, inheritable, /)
Set the inheritable flag of the specified file descriptor.
spawnl(mode, file, *args)
spawnl(mode, file, *args) -> integer
Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnle(mode, file, *args)
spawnle(mode, file, *args, env) -> integer
Execute file with arguments from args in a subprocess with the
supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.
spawnv(mode, path, argv, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
spawnve(mode, path, argv, env, /)
Execute the program specified by path in a new process.
mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.
startfile(...)
Start a file with its associated application.
When "operation" is not specified or "open", this acts like
double-clicking the file in Explorer, or giving the file name as an
argument to the DOS "start" command: the file is opened with whatever
application (if any) its extension is associated.
When another "operation" is given, it specifies what should be done with
the file. A typical operation is "print".
"arguments" is passed to the application, but should be omitted if the
file is a document.
"cwd" is the working directory for the operation. If "filepath" is
relative, it will be resolved against this directory. This argument
should usually be an absolute path.
"show_cmd" can be used to override the recommended visibility option.
See the Windows ShellExecute documentation for values.
startfile returns as soon as the associated application is launched.
There is no option to wait for the application to close, and no way
to retrieve the application's exit status.
The filepath is relative to the current directory. If you want to use
an absolute path, make sure the first character is not a slash ("/");
the underlying Win32 ShellExecute function doesn't work if it is.
stat(path, *, dir_fd=None, follow_symlinks=True)
Perform a stat system call on the given path.
path
Path to be examined; can be string, bytes, a path-like object or
open-file-descriptor int.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be a relative string; path will then be relative to
that directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
stat will examine the symbolic link itself instead of the file
the link points to.
dir_fd and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.
It's an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
strerror(code, /)
Translate an error code to a message string.
symlink(src, dst, target_is_directory=False, *, dir_fd=None)
Create a symbolic link pointing to src named dst.
target_is_directory is required on Windows if the target is to be
interpreted as a directory. (On Windows, symlink requires
Windows 6.0 or greater, and raises a NotImplementedError otherwise.)
target_is_directory is ignored on non-Windows platforms.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
system(command)
Execute the command in a subshell.
times()
Return a collection containing process timing information.
The object returned behaves like a named tuple with these fields:
(utime, stime, cutime, cstime, elapsed_time)
All fields are floating-point numbers.
truncate(path, length)
Truncate a file, specified by path, to a specific length.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
umask(mask, /)
Set the current numeric umask and return the previous umask.
unlink(path, *, dir_fd=None)
Remove a file (same as remove()).
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.
unsetenv(name, /)
Delete an environment variable.
urandom(size, /)
Return a bytes object containing random bytes suitable for cryptographic use.
utime(...)
Set the access and modified time of path.
path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
If times is not None, it must be a tuple (atime, mtime);
atime and mtime should be expressed as float seconds since the epoch.
If ns is specified, it must be a tuple (atime_ns, mtime_ns);
atime_ns and mtime_ns should be expressed as integer nanoseconds
since the epoch.
If times is None and ns is unspecified, utime uses the current time.
Specifying tuples for both times and ns is an error.
If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
If follow_symlinks is False, and the last element of the path is a symbolic
link, utime will modify the symbolic link itself instead of the file the
link points to.
It is an error to use dir_fd or follow_symlinks when specifying path
as an open file descriptor.
dir_fd and follow_symlinks may not be available on your platform.
If they are unavailable, using them will raise a NotImplementedError.
waitpid(pid, options, /)
Wait for completion of a given process.
Returns a tuple of information regarding the process:
(pid, status << 8)
The options argument is ignored on Windows.
waitstatus_to_exitcode(status)
Convert a wait status to an exit code.
On Unix:
* If WIFEXITED(status) is true, return WEXITSTATUS(status).
* If WIFSIGNALED(status) is true, return -WTERMSIG(status).
* Otherwise, raise a ValueError.
On Windows, return status shifted right by 8 bits.
On Unix, if the process is being traced or if waitpid() was called with
WUNTRACED option, the caller must first check if WIFSTOPPED(status) is true.
This function must not be called if WIFSTOPPED(status) is true.
walk(top, topdown=True, onerror=None, followlinks=False)
Directory tree generator.
For each directory in the directory tree rooted at top (including top
itself, but excluding '.' and '..'), yields a 3-tuple
dirpath, dirnames, filenames
dirpath is a string, the path to the directory. dirnames is a list of
the names of the subdirectories in dirpath (including symlinks to directories,
and excluding '.' and '..').
filenames is a list of the names of the non-directory files in dirpath.
Note that the names in the lists are just names, with no path components.
To get a full path (which begins with top) to a file or directory in
dirpath, do os.path.join(dirpath, name).
If optional arg 'topdown' is true or not specified, the triple for a
directory is generated before the triples for any of its subdirectories
(directories are generated top down). If topdown is false, the triple
for a directory is generated after the triples for all of its
subdirectories (directories are generated bottom up).
When topdown is true, the caller can modify the dirnames list in-place
(e.g., via del or slice assignment), and walk will only recurse into the
subdirectories whose names remain in dirnames; this can be used to prune the
search, or to impose a specific order of visiting. Modifying dirnames when
topdown is false has no effect on the behavior of os.walk(), since the
directories in dirnames have already been generated by the time dirnames
itself is generated. No matter the value of topdown, the list of
subdirectories is retrieved before the tuples for the directory and its
subdirectories are generated.
By default errors from the os.scandir() call are ignored. If
optional arg 'onerror' is specified, it should be a function; it
will be called with one argument, an OSError instance. It can
report the error to continue with the walk, or raise the exception
to abort the walk. Note that the filename is available as the
filename attribute of the exception object.
By default, os.walk does not follow symbolic links to subdirectories on
systems that support them. In order to get this functionality, set the
optional argument 'followlinks' to true.
Caution: if you pass a relative pathname for top, don't change the
current working directory between resumptions of walk. walk never
changes the current directory, and assumes that the client doesn't
either.
Example:
import os
from os.path import join, getsize
for root, dirs, files in os.walk('python/Lib/email'):
print(root, "consumes ")
print(sum(getsize(join(root, name)) for name in files), end=" ")
print("bytes in", len(files), "non-directory files")
if 'CVS' in dirs:
dirs.remove('CVS') # don't visit CVS directories
write(fd, data, /)
Write a bytes object to a file descriptor.
DATA
EX_OK = 0
F_OK = 0
O_APPEND = 8
O_BINARY = 32768
O_CREAT = 256
O_EXCL = 1024
O_NOINHERIT = 128
O_RANDOM = 16
O_RDONLY = 0
O_RDWR = 2
O_SEQUENTIAL = 32
O_SHORT_LIVED = 4096
O_TEMPORARY = 64
O_TEXT = 16384
O_TRUNC = 512
O_WRONLY = 1
P_DETACH = 4
P_NOWAIT = 1
P_NOWAITO = 3
P_OVERLAY = 2
P_WAIT = 0
R_OK = 4
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
TMP_MAX = 2147483647
W_OK = 2
X_OK = 1
__all__ = ['altsep', 'curdir', 'pardir', 'sep', 'pathsep', 'linesep', ...
altsep = '/'
curdir = '.'
defpath = r'.;C:\bin'
devnull = 'nul'
environ = environ({'ALLUSERSPROFILE': 'C:\\ProgramData', '...undled\\l...
extsep = '.'
linesep = '\r\n'
name = 'nt'
pardir = '..'
pathsep = ';'
sep = r'\'
supports_bytes_environ = False
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\os.py
ezdxf.path
Python Library Documentation: package ezdxf.path in ezdxf
NAME
ezdxf.path
DESCRIPTION
# Copyright (c) 2021-2022, Manfred Moitzi
# License: MIT License
#
# Ezdxf user: DO NOT IMPORT FROM ezdxf.path.* MODULES!
# import all Path() related classes and functions from ezdxf.path
#
# from ezdxf.path import Path, make_path,
#
PACKAGE CONTENTS
commands
converter
nesting
path
shapes
tools
DATA
AnyCurve = (<Command.CURVE3_TO: 2>, <Command.CURVE4_TO: 3>)
PathElement = typing.Union[ezdxf.path.commands.LineTo, ezdxf.p...th.co...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\path\__init__.py
ezdxf.pattern
Python Library Documentation: module ezdxf.tools.pattern in ezdxf.tools
NAME
ezdxf.tools.pattern
DESCRIPTION
# Copyright (c) 2015-2022, Manfred Moitzi
# License: MIT License
CLASSES
builtins.object
PatternAnalyser
class PatternAnalyser(builtins.object)
| PatternAnalyser(pattern: 'HatchPatternType')
|
| Methods defined here:
|
| __init__(self, pattern: 'HatchPatternType')
| Initialize self. See help(type(self)) for accurate signature.
|
| all_angles(self, angle: 'int') -> 'bool'
|
| all_dashed_lines(self) -> 'bool'
|
| all_lines(self, angle: 'int', solid: 'bool') -> 'bool'
|
| all_solid_lines(self) -> 'bool'
|
| has_angle(self, angle: 'int') -> 'bool'
|
| has_dashed_line(self) -> 'bool'
|
| has_line(self, angle: 'int', solid: 'bool') -> 'bool'
|
| has_solid_line(self) -> 'bool'
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
FUNCTIONS
load(measurement: 'int' = 1, factor: 'Optional[float]' = None)
Load hatch pattern definition, default scaling is like the iso.pat of
BricsCAD, set `measurement` to 0 to use the imperial (US) scaled pattern,
which has a scaling factor of 1/25.4 = ~0.03937.
Args:
measurement: like the $MEASUREMENT header variable, 0 to user imperial
scaled pattern, 1 to use ISO scaled pattern.
factor: hatch pattern scaling factor, overrides `measurement`
Returns: hatch pattern dict of scaled pattern
parse(pattern: 'str') -> 'dict'
scale_all(pattern: 'dict', factor: 'float' = 1, angle: 'float' = 0)
scale_pattern(pattern: 'HatchPatternType', factor: 'float' = 1, angle: 'float' = 0) -> 'HatchPatternType'
DATA
HatchPatternLineType = typing.Tuple[float, typing.Sequence[float], typ...
HatchPatternType = typing.Sequence[typing.Tuple[float, typing.Seque......
IMPERIAL_PATTERN = {'ACAD_ISO02W100': [[0.0, (0.0, 0.0), (0.0, 0.19685...
ISO_PATTERN = {'ACAD_ISO02W100': [[0.0, (0.0, 0.0), (0.0, 5.0), [12.0,...
__all__ = ['load', 'scale_pattern', 'scale_all', 'parse', 'ISO_PATTERN...
__annotations__ = {'HatchPatternLineType': 'TypeAlias', 'HatchPatternT...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\tools\pattern.py
ezdxf.print_config
Python Library Documentation: function print_config in module ezdxf print_config(verbose: bool = False, stream: Optional[TextIO] = None) -> None
ezdxf.protocols
Python Library Documentation: module ezdxf.protocols in ezdxf
NAME
ezdxf.protocols
DESCRIPTION
# Copyright (c) 2021-2024, Manfred Moitzi
# License: MIT License
CLASSES
typing_extensions.Protocol(typing.Generic)
ReferencedBlocks
SupportsBoundingBox
SupportsMessages
SupportsTemporaryTransformation
SupportsTransform
SupportsVirtualEntities
class ReferencedBlocks(typing_extensions.Protocol)
| ReferencedBlocks(*args, **kwargs)
|
| Method resolution order:
| ReferencedBlocks
| typing_extensions.Protocol
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__ = _no_init(self, *args, **kwargs) from typing_extensions
|
| __referenced_blocks__(self) -> 'Iterable[str]'
| Returns the handles to the BLOCK_RECORD entities for all BLOCK
| definitions used by an entity.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __subclasshook__ = _proto_hook(other) from typing_extensions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| __non_callable_proto_members__ = set()
|
| __parameters__ = ()
|
| __protocol_attrs__ = {'__referenced_blocks__'}
|
| ----------------------------------------------------------------------
| Class methods inherited from typing_extensions.Protocol:
|
| __init_subclass__(*args, **kwargs)
| Function to initialize subclasses.
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
class SupportsBoundingBox(typing_extensions.Protocol)
| SupportsBoundingBox(*args, **kwargs)
|
| Method resolution order:
| SupportsBoundingBox
| typing_extensions.Protocol
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__ = _no_init(self, *args, **kwargs) from typing_extensions
|
| bbox(self) -> 'AbstractBoundingBox'
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __subclasshook__ = _proto_hook(other) from typing_extensions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| __parameters__ = ()
|
| __protocol_attrs__ = {'bbox'}
|
| ----------------------------------------------------------------------
| Class methods inherited from typing_extensions.Protocol:
|
| __init_subclass__(*args, **kwargs)
| Function to initialize subclasses.
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
class SupportsMessages(typing_extensions.Protocol)
| SupportsMessages(*args, **kwargs)
|
| Method resolution order:
| SupportsMessages
| typing_extensions.Protocol
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__ = _no_init(self, *args, **kwargs) from typing_extensions
|
| notify(self, message_type: 'int', data: 'Any' = None) -> 'None'
| Internal messaging system.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __subclasshook__ = _proto_hook(other) from typing_extensions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| __parameters__ = ()
|
| __protocol_attrs__ = {'notify'}
|
| ----------------------------------------------------------------------
| Class methods inherited from typing_extensions.Protocol:
|
| __init_subclass__(*args, **kwargs)
| Function to initialize subclasses.
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
class SupportsTemporaryTransformation(typing_extensions.Protocol)
| SupportsTemporaryTransformation(*args, **kwargs)
|
| Method resolution order:
| SupportsTemporaryTransformation
| typing_extensions.Protocol
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__ = _no_init(self, *args, **kwargs) from typing_extensions
|
| temporary_transformation(self) -> 'TemporaryTransformation'
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __subclasshook__ = _proto_hook(other) from typing_extensions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| __non_callable_proto_members__ = set()
|
| __parameters__ = ()
|
| __protocol_attrs__ = {'temporary_transformation'}
|
| ----------------------------------------------------------------------
| Class methods inherited from typing_extensions.Protocol:
|
| __init_subclass__(*args, **kwargs)
| Function to initialize subclasses.
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
class SupportsTransform(typing_extensions.Protocol)
| SupportsTransform(*args, **kwargs)
|
| Method resolution order:
| SupportsTransform
| typing_extensions.Protocol
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__ = _no_init(self, *args, **kwargs) from typing_extensions
|
| transform(self, m: 'Matrix44') -> 'DXFGraphic'
| Raises NotImplementedError() if transformation is not supported.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __subclasshook__ = _proto_hook(other) from typing_extensions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| __parameters__ = ()
|
| __protocol_attrs__ = {'transform'}
|
| ----------------------------------------------------------------------
| Class methods inherited from typing_extensions.Protocol:
|
| __init_subclass__(*args, **kwargs)
| Function to initialize subclasses.
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
class SupportsVirtualEntities(typing_extensions.Protocol)
| SupportsVirtualEntities(*args, **kwargs)
|
| The virtual entities protocol is used to disassemble complex entities
| into DXF primitives like LINE, ARC, ... as REQUIREMENT to render these
| entities. Which means the entity does not have :func:`ezdxf.path.make_path`
| support, except the text entities TEXT, ATTRIB and MTEXT.
|
| Optional DECONSTRUCTION of entities into DXF primitives like LWPOLYLINE
| into LINE and ARC entities is NOT the intended usage of this protocol!
|
| This protocol is for consistent internal usage and does not replace
| the :meth:`virtual_entities` methods!
|
| Method resolution order:
| SupportsVirtualEntities
| typing_extensions.Protocol
| typing.Generic
| builtins.object
|
| Methods defined here:
|
| __init__ = _no_init(self, *args, **kwargs) from typing_extensions
|
| __virtual_entities__(self) -> 'Iterator[DXFGraphic]'
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __subclasshook__ = _proto_hook(other) from typing_extensions
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __annotations__ = {}
|
| __non_callable_proto_members__ = set()
|
| __parameters__ = ()
|
| __protocol_attrs__ = {'__virtual_entities__'}
|
| ----------------------------------------------------------------------
| Class methods inherited from typing_extensions.Protocol:
|
| __init_subclass__(*args, **kwargs)
| Function to initialize subclasses.
|
| ----------------------------------------------------------------------
| Class methods inherited from typing.Generic:
|
| __class_getitem__(...)
| Parameterizes a generic class.
|
| At least, parameterizing a generic class is the *main* thing this
| method does. For example, for some generic class `Foo`, this is called
| when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.
|
| However, note that this method is also called when defining generic
| classes in the first place with `class Foo[T]: ...`.
FUNCTIONS
query_virtual_entities(entity: 'SupportsVirtualEntities') -> 'EntityQuery'
referenced_blocks(entity: 'DXFEntity') -> 'Iterable[str]'
Returns the handles to the BLOCK_RECORD entities for all BLOCK
definitions used by an entity.
virtual_entities(entity: 'SupportsVirtualEntities') -> 'Iterator[DXFGraphic]'
DATA
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
Iterator = typing.Iterator
A generic version of collections.abc.Iterator.
TYPE_CHECKING = False
__annotations__ = {'_EMPTY_TUPLE': 'tuple'}
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\protocols.py
ezdxf.proxygraphic
Python Library Documentation: module ezdxf.proxygraphic in ezdxf
NAME
ezdxf.proxygraphic
DESCRIPTION
# Copyright (c) 2020-2023, Manfred Moitzi
# License: MIT License
CLASSES
builtins.Exception(builtins.BaseException)
ProxyGraphicError
builtins.object
ProxyGraphic
ProxyGraphicDebugger
enum.IntEnum(builtins.int, enum.ReprEnum)
ProxyGraphicTypes
class ProxyGraphic(builtins.object)
| ProxyGraphic(data: 'bytes', doc: 'Optional[Drawing]' = None, *, dxfversion='AC1015')
|
| Methods defined here:
|
| __init__(self, data: 'bytes', doc: 'Optional[Drawing]' = None, *, dxfversion='AC1015')
| Initialize self. See help(type(self)) for accurate signature.
|
| __virtual_entities__(self) -> 'Iterator[DXFGraphic]'
| Implements the SupportsVirtualEntities protocol.
|
| attribute_color(self, data: 'bytes')
|
| attribute_fill(self, data: 'bytes')
|
| attribute_layer(self, data: 'bytes')
|
| attribute_linetype(self, data: 'bytes')
|
| attribute_lineweight(self, data: 'bytes')
|
| attribute_ltscale(self, data: 'bytes')
|
| attribute_marker(self, data: 'bytes')
|
| attribute_thickness(self, data: 'bytes')
|
| attribute_true_color(self, data: 'bytes')
|
| circle(self, data: 'bytes')
|
| circle_3p(self, data: 'bytes')
|
| circular_arc(self, data: 'bytes')
|
| circular_arc_3p(self, data: 'bytes')
|
| elliptic_arc(self, data: 'bytes')
|
| info(self) -> 'Iterable[tuple[int, int, str]]'
|
| lwpolyline(self, data: 'bytes')
|
| mesh(self, data: 'bytes')
|
| polygon(self, data: 'bytes')
|
| polyline(self, data: 'bytes')
|
| polyline_with_normals(self, data: 'bytes')
|
| pop_matrix(self, data: 'bytes')
|
| push_matrix(self, data: 'bytes')
|
| ray(self, data: 'bytes')
|
| reset_colors(self)
|
| shell(self, data: 'bytes')
|
| text(self, data: 'bytes')
|
| text2(self, data: 'bytes')
|
| unicode_text(self, data: 'bytes')
|
| unicode_text2(self, data: 'bytes')
|
| unsafe_virtual_entities(self) -> 'Iterable[DXFGraphic]'
|
| virtual_entities(self) -> 'Iterator[DXFGraphic]'
|
| xline(self, data: 'bytes')
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class ProxyGraphicDebugger(ProxyGraphic)
| ProxyGraphicDebugger(data: 'bytes', doc: 'Optional[Drawing]' = None, debug_stream=None)
|
| Method resolution order:
| ProxyGraphicDebugger
| ProxyGraphic
| builtins.object
|
| Methods defined here:
|
| __init__(self, data: 'bytes', doc: 'Optional[Drawing]' = None, debug_stream=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| attribute_color(self, data: 'bytes')
|
| attribute_fill(self, data: 'bytes')
|
| attribute_layer(self, data: 'bytes')
|
| attribute_linetype(self, data: 'bytes')
|
| attribute_lineweight(self, data: 'bytes')
|
| attribute_ltscale(self, data: 'bytes')
|
| attribute_true_color(self, data: 'bytes')
|
| get_state(self) -> 'str'
|
| log_commands(self)
|
| log_entities(self)
|
| log_message(self, msg: 'str')
|
| log_separator(self, char='-', newline=True)
|
| log_state(self)
|
| ----------------------------------------------------------------------
| Methods inherited from ProxyGraphic:
|
| __virtual_entities__(self) -> 'Iterator[DXFGraphic]'
| Implements the SupportsVirtualEntities protocol.
|
| attribute_marker(self, data: 'bytes')
|
| attribute_thickness(self, data: 'bytes')
|
| circle(self, data: 'bytes')
|
| circle_3p(self, data: 'bytes')
|
| circular_arc(self, data: 'bytes')
|
| circular_arc_3p(self, data: 'bytes')
|
| elliptic_arc(self, data: 'bytes')
|
| info(self) -> 'Iterable[tuple[int, int, str]]'
|
| lwpolyline(self, data: 'bytes')
|
| mesh(self, data: 'bytes')
|
| polygon(self, data: 'bytes')
|
| polyline(self, data: 'bytes')
|
| polyline_with_normals(self, data: 'bytes')
|
| pop_matrix(self, data: 'bytes')
|
| push_matrix(self, data: 'bytes')
|
| ray(self, data: 'bytes')
|
| reset_colors(self)
|
| shell(self, data: 'bytes')
|
| text(self, data: 'bytes')
|
| text2(self, data: 'bytes')
|
| unicode_text(self, data: 'bytes')
|
| unicode_text2(self, data: 'bytes')
|
| unsafe_virtual_entities(self) -> 'Iterable[DXFGraphic]'
|
| virtual_entities(self) -> 'Iterator[DXFGraphic]'
|
| xline(self, data: 'bytes')
|
| ----------------------------------------------------------------------
| Data descriptors inherited from ProxyGraphic:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class ProxyGraphicError(builtins.Exception)
| Method resolution order:
| ProxyGraphicError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class ProxyGraphicTypes(enum.IntEnum)
| ProxyGraphicTypes(*values)
|
| Method resolution order:
| ProxyGraphicTypes
| enum.IntEnum
| builtins.int
| enum.ReprEnum
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ATTRIBUTE_COLOR = <ProxyGraphicTypes.ATTRIBUTE_COLOR: 14>
|
| ATTRIBUTE_FILL = <ProxyGraphicTypes.ATTRIBUTE_FILL: 20>
|
| ATTRIBUTE_LAYER = <ProxyGraphicTypes.ATTRIBUTE_LAYER: 16>
|
| ATTRIBUTE_LINETYPE = <ProxyGraphicTypes.ATTRIBUTE_LINETYPE: 18>
|
| ATTRIBUTE_LINEWEIGHT = <ProxyGraphicTypes.ATTRIBUTE_LINEWEIGHT: 23>
|
| ATTRIBUTE_LTSCALE = <ProxyGraphicTypes.ATTRIBUTE_LTSCALE: 24>
|
| ATTRIBUTE_MAPPER = <ProxyGraphicTypes.ATTRIBUTE_MAPPER: 35>
|
| ATTRIBUTE_MARKER = <ProxyGraphicTypes.ATTRIBUTE_MARKER: 19>
|
| ATTRIBUTE_MATERIAL = <ProxyGraphicTypes.ATTRIBUTE_MATERIAL: 34>
|
| ATTRIBUTE_PLOT_STYLE_NAME = <ProxyGraphicTypes.ATTRIBUTE_PLOT_STYLE_NA...
|
| ATTRIBUTE_THICKNESS = <ProxyGraphicTypes.ATTRIBUTE_THICKNESS: 25>
|
| ATTRIBUTE_TRUE_COLOR = <ProxyGraphicTypes.ATTRIBUTE_TRUE_COLOR: 22>
|
| CIRCLE = <ProxyGraphicTypes.CIRCLE: 2>
|
| CIRCLE_3P = <ProxyGraphicTypes.CIRCLE_3P: 3>
|
| CIRCULAR_ARC = <ProxyGraphicTypes.CIRCULAR_ARC: 4>
|
| CIRCULAR_ARC_3P = <ProxyGraphicTypes.CIRCULAR_ARC_3P: 5>
|
| ELLIPTIC_ARC = <ProxyGraphicTypes.ELLIPTIC_ARC: 44>
|
| EXTENTS = <ProxyGraphicTypes.EXTENTS: 1>
|
| LWPOLYLINE = <ProxyGraphicTypes.LWPOLYLINE: 33>
|
| MESH = <ProxyGraphicTypes.MESH: 8>
|
| POLYGON = <ProxyGraphicTypes.POLYGON: 7>
|
| POLYLINE = <ProxyGraphicTypes.POLYLINE: 6>
|
| POLYLINE_WITH_NORMALS = <ProxyGraphicTypes.POLYLINE_WITH_NORMALS: 32>
|
| POP_CLIP = <ProxyGraphicTypes.POP_CLIP: 28>
|
| POP_MATRIX = <ProxyGraphicTypes.POP_MATRIX: 31>
|
| PUSH_CLIP = <ProxyGraphicTypes.PUSH_CLIP: 27>
|
| PUSH_MATRIX = <ProxyGraphicTypes.PUSH_MATRIX: 29>
|
| PUSH_MATRIX2 = <ProxyGraphicTypes.PUSH_MATRIX2: 30>
|
| RAY = <ProxyGraphicTypes.RAY: 13>
|
| SHELL = <ProxyGraphicTypes.SHELL: 9>
|
| TEXT = <ProxyGraphicTypes.TEXT: 10>
|
| TEXT2 = <ProxyGraphicTypes.TEXT2: 11>
|
| UNICODE_TEXT = <ProxyGraphicTypes.UNICODE_TEXT: 36>
|
| UNICODE_TEXT2 = <ProxyGraphicTypes.UNICODE_TEXT2: 38>
|
| UNKNOWN_37 = <ProxyGraphicTypes.UNKNOWN_37: 37>
|
| UNUSED_15 = <ProxyGraphicTypes.UNUSED_15: 15>
|
| UNUSED_17 = <ProxyGraphicTypes.UNUSED_17: 17>
|
| UNUSED_21 = <ProxyGraphicTypes.UNUSED_21: 21>
|
| XLINE = <ProxyGraphicTypes.XLINE: 12>
|
| ----------------------------------------------------------------------
| Methods inherited from enum.IntEnum:
|
| __repr__(self) from enum.Enum
| Return repr(self).
|
| __str__ = __repr__(self, /) from builtins.int
| Return repr(self).
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
FUNCTIONS
export_proxy_graphic(data: 'bytes', tagwriter: 'AbstractTagWriter', length_code: 'int' = 160, data_code: 'int' = 310) -> 'None'
has_prim_traits(flags: 'int') -> 'bool'
is_2d_polyline(vertices: 'list[Vec3]') -> 'bool'
load_proxy_graphic(tags: 'Tags', length_code: 'int' = 160, data_code: 'int' = 310) -> 'Optional[bytes]'
prims_have_colors(flags: 'int') -> 'bool'
prims_have_layers(flags: 'int') -> 'bool'
prims_have_linetypes(flags: 'int') -> 'bool'
prims_have_markers(flags: 'int') -> 'bool'
prims_have_normals(flags: 'int') -> 'bool'
prims_have_orientation(flags: 'int') -> 'bool'
prims_have_visibilities(flags: 'int') -> 'bool'
read_mesh_traits(bs: 'ByteStream', edge_count: 'int', face_count: 'int', vertex_count: 'int')
read_prim_traits(bs: 'ByteStream', types: 'Sequence[str]', prim_flags: 'int', count: 'int') -> 'dict'
DATA
CHUNK_SIZE = 127
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
Iterator = typing.Iterator
A generic version of collections.abc.Iterator.
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
Sequence = typing.Sequence
A generic version of collections.abc.Sequence.
TRAIT_TESTER = {'colors': (<function prims_have_colors>, 'RL'), 'layer...
TYPE_CHECKING = False
X_AXIS = Vec3(1.0, 0.0, 0.0)
Z_AXIS = Vec3(0.0, 0.0, 1.0)
logger = <Logger ezdxf (WARNING)>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\proxygraphic.py
ezdxf.query
Python Library Documentation: module ezdxf.query in ezdxf
NAME
ezdxf.query
DESCRIPTION
# Copyright (c) 2013-2026, Manfred Moitzi
# License: MIT License
CLASSES
builtins.object
BoolExpression
Relation
collections.abc.Sequence(collections.abc.Reversible, collections.abc.Collection)
EntityQuery
class BoolExpression(builtins.object)
| BoolExpression(tokens: 'Sequence')
|
| Methods defined here:
|
| __init__(self, tokens: 'Sequence')
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self)
|
| evaluate(self, entity: 'DXFEntity') -> 'bool'
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| OPERATORS = {'&': <built-in function and_>, '|': <built-in function or...
class EntityQuery(collections.abc.Sequence)
| EntityQuery(entities: 'Optional[Iterable[DXFEntity]]' = None, query: 'str' = '*')
|
| EntityQuery is a result container, which is filled with dxf entities
| matching the query string. It is possible to add entities to the container
| (extend), remove entities from the container and to filter the container.
|
| Query String
| ============
|
| QueryString := EntityQuery ("[" AttribQuery "]")*
|
| The query string is the combination of two queries, first the required
| entity query and second the optional attribute query, enclosed in square
| brackets.
|
| Entity Query
| ------------
|
| The entity query is a whitespace separated list of DXF entity names or the
| special name ``*``. Where ``*`` means all DXF entities, exclude some entity
| types by appending their names with a preceding ``!`` (e.g. all entities
| except LINE = ``* !LINE``). All DXF names have to be uppercase.
|
| Attribute Query
| ---------------
|
| The attribute query is used to select DXF entities by its DXF attributes.
| The attribute query is an addition to the entity query and matches only if
| the entity already match the entity query.
| The attribute query is a boolean expression, supported operators are:
|
| - not: !term is true, if term is false
| - and: term & term is true, if both terms are true
| - or: term | term is true, if one term is true
| - and arbitrary nested round brackets
|
| Attribute selection is a term: "name comparator value", where name is a DXF
| entity attribute in lowercase, value is a integer, float or double quoted
| string, valid comparators are:
|
| - "==" equal "value"
| - "!=" not equal "value"
| - "<" lower than "value"
| - "<=" lower or equal than "value"
| - ">" greater than "value"
| - ">=" greater or equal than "value"
| - "?" match regular expression "value"
| - "!?" does not match regular expression "value"
|
| Query Result
| ------------
|
| The EntityQuery() class based on the abstract Sequence() class, contains all
| DXF entities of the source collection, which matches one name of the entity
| query AND the whole attribute query. If a DXF entity does not have or
| support a required attribute, the corresponding attribute search term is
| false.
|
| Examples:
|
| - 'LINE[text ? ".*"]' is always empty, because the LINE entity has no
| text attribute.
| - 'LINE CIRCLE[layer=="construction"]' => all LINE and CIRCLE entities
| on layer "construction"
| - '*[!(layer=="construction" & color<7)]' => all entities except those
| on layer == "construction" and color < 7
|
| Method resolution order:
| EntityQuery
| collections.abc.Sequence
| collections.abc.Reversible
| collections.abc.Collection
| collections.abc.Sized
| collections.abc.Iterable
| collections.abc.Container
| builtins.object
|
| Methods defined here:
|
| __and__(self, other)
| Intersection operator, see :meth:`intersection`.
|
| __delitem__(self, key)
| Discard the DXF attribute `key` from all supported DXF entities.
|
| __eq__(self, other)
| Equal selector (self == other).
| Returns all entities where the selected DXF attribute is equal to
| `other`.
|
| __ge__(self, other)
| Greater equal selector (self >= other). Returns all entities where
| the selected DXF attribute is greater or equal `other`.
|
| Raises:
| TypeError: for vector based attributes like `center` or `insert`
|
| __getitem__(self, item)
| Returns DXFEntity at index `item`, supports negative indices and
| slicing. Returns all entities which support a specific DXF attribute,
| if `item` is a DXF attribute name as string.
|
| __gt__(self, other)
| Greater than selector (self > other). Returns all entities where the
| selected DXF attribute is greater than `other`.
|
| Raises:
| TypeError: for vector based attributes like `center` or `insert`
|
| __init__(self, entities: 'Optional[Iterable[DXFEntity]]' = None, query: 'str' = '*')
| Setup container with entities matching the initial query.
|
| Args:
| entities: sequence of wrapped DXF entities (at least GraphicEntity class)
| query: query string, see class documentation
|
| __iter__(self) -> 'Iterator[DXFEntity]'
| Returns iterable of DXFEntity objects.
|
| __le__(self, other)
| Less equal selector (self <= other). Returns all entities where the
| selected DXF attribute is less or equal `other`.
|
| Raises:
| TypeError: for vector based attributes like `center` or `insert`
|
| __len__(self) -> 'int'
| Returns count of DXF entities.
|
| __lt__(self, other)
| Less than selector (self < other). Returns all entities where the
| selected DXF attribute is less than `other`.
|
| Raises:
| TypeError: for vector based attributes like `center` or `insert`
|
| __ne__(self, other)
| Not equal selector (self != other). Returns all entities where the
| selected DXF attribute is not equal to `other`.
|
| __or__(self, other)
| Union operator, see :meth:`union`.
|
| __setitem__(self, key, value)
| Set the DXF attribute `key` for all supported DXF entities to `value`.
|
| __sub__(self, other)
| Difference operator, see :meth:`difference`.
|
| __xor__(self, other)
| Symmetric difference operator, see :meth:`symmetric_difference`.
|
| difference(self, other: 'EntityQuery') -> 'EntityQuery'
| Returns a new :class:`EntityQuery` with all entities from `self` that
| are not in `other`.
|
| extend(self, entities: 'Iterable[DXFEntity]', query: 'str' = '*') -> 'EntityQuery'
| Extent the :class:`EntityQuery` container by entities matching an
| additional query.
|
| filter(self, func: 'Callable[[DXFEntity], bool]') -> 'EntityQuery'
| Returns a new :class:`EntityQuery` with all entities from this
| container for which the callable `func` returns ``True``.
|
| Build your own operator to filter by attributes which are not DXF
| attributes or to build complex queries::
|
| result = msp.query().filter(
| lambda e: hasattr(e, "rgb") and e.rbg == (0, 0, 0)
| )
|
| groupby(self, dxfattrib: 'str' = '', key: 'Optional[Callable[[DXFEntity], Hashable]]' = None) -> 'dict[Hashable, list[DXFEntity]]'
| Returns a dict of entity lists, where entities are grouped by a DXF
| attribute or a key function.
|
| Args:
| dxfattrib: grouping DXF attribute as string like ``'layer'``
| key: key function, which accepts a DXFEntity as argument, returns
| grouping key of this entity or ``None`` for ignore this object.
| Reason for ignoring: a queried DXF attribute is not supported by
| this entity
|
| intersection(self, other: 'EntityQuery') -> 'EntityQuery'
| Returns a new :class:`EntityQuery` with entities common to `self`
| and `other`.
|
| match(self, pattern: 'str') -> 'EntityQuery'
| Returns all entities where the selected DXF attribute matches the
| regular expression `pattern`.
|
| Raises:
| TypeError: for non-string based attributes
|
| purge(self) -> 'EntityQuery'
| Remove destroyed entities.
|
| query(self, query: 'str' = '*') -> 'EntityQuery'
| Returns a new :class:`EntityQuery` container with all entities
| matching this additional query.
|
| Raises:
| pyparsing.ParseException: query string parsing error
|
| remove(self, query: 'str' = '*') -> 'EntityQuery'
| Remove all entities from :class:`EntityQuery` container matching this
| additional query.
|
| symmetric_difference(self, other: 'EntityQuery') -> 'EntityQuery'
| Returns a new :class:`EntityQuery` with entities in either `self` or
| `other` but not both.
|
| union(self, other: 'EntityQuery') -> 'EntityQuery'
| Returns a new :class:`EntityQuery` with entities from `self` and
| `other`. All entities are unique - no duplicates.
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| first
| First entity or ``None``.
|
| last
| Last entity or ``None``.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| color
|
| invisible
|
| layer
|
| linetype
|
| lineweight
|
| ltscale
|
| transparency
|
| true_color
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| __hash__ = None
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.Sequence:
|
| __contains__(self, value)
|
| __reversed__(self)
|
| count(self, value)
| S.count(value) -> integer -- return number of occurrences of value
|
| index(self, value, start=0, stop=None)
| S.index(value, [start, [stop]]) -> integer -- return first index of value.
| Raises ValueError if the value is not present.
|
| Supporting start and stop arguments is optional, but
| recommended.
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Reversible:
|
| __subclasshook__(C)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterable:
|
| __class_getitem__ = GenericAlias(...)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
class Relation(builtins.object)
| Relation(relation: 'Sequence', ignore_case: 'bool')
|
| Methods defined here:
|
| __init__(self, relation: 'Sequence', ignore_case: 'bool')
| Initialize self. See help(type(self)) for accurate signature.
|
| evaluate(self, entity: 'DXFEntity') -> 'bool'
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| CMP_OPERATORS = {'!=': <built-in function ne>, '!?': <function Relatio...
|
| VALID_CMP_OPERATORS = frozenset({'!=', '!?', '<', '<=', '==', '>', ......
FUNCTIONS
build_entity_attributes_matcher(tokens: 'Sequence', options: 'str') -> 'Callable[[DXFEntity], bool]'
build_entity_name_matcher(names: 'Sequence[str]') -> 'Callable[[DXFEntity], bool]'
entity_matcher(query: 'str') -> 'Callable[[DXFEntity], bool]'
name_matcher(query: 'str' = '*') -> 'Callable[[str], bool]'
name_query(names: 'Iterable[str]', query: 'str' = '*') -> 'Iterator[str]'
Filters `names` by `query` string. The `query` string of entity names
divided by spaces. The special name "*" matches any given name, a
preceding "!" means exclude this name. Excluding names is only useful if
the match any name is also given (e.g. "LINE !CIRCLE" is equal to just
"LINE", where "* !CIRCLE" matches everything except CIRCLE").
Args:
names: iterable of names to test
query: query string of entity names separated by spaces
Returns: yield matching names
new(entities: 'Optional[Iterable[DXFEntity]]' = None, query: 'str' = '*') -> 'EntityQuery'
Start a new query based on sequence `entities`. The `entities` argument
has to be an iterable of :class:`~ezdxf.entities.DXFEntity` or inherited
objects and returns an :class:`EntityQuery` object.
to_lower(value)
unique_entities(entities: 'Iterable[DXFEntity]') -> 'Iterator[DXFEntity]'
Yield all unique entities, order of all entities will be preserved.
DATA
Callable = typing.Callable
Deprecated alias to collections.abc.Callable.
Callable[[int], str] signifies a function that takes a single
parameter of type int and returns a str.
The subscription syntax must always be used with exactly two
values: the argument list and the return type.
The argument list must be a list of types, a ParamSpec,
Concatenate or ellipsis. The return type must be a single type.
There is no syntax to indicate optional or keyword arguments;
such function types are rarely used as callback types.
EntityQueryParser = {Group:({{'*' [Re:('[!][\w]+')]...} | {W:(0-9A-Z.....
Hashable = typing.Hashable
A generic version of collections.abc.Hashable.
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
Iterator = typing.Iterator
A generic version of collections.abc.Iterator.
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
Sequence = typing.Sequence
A generic version of collections.abc.Sequence.
Union = typing.Union
Union type; Union[X, Y] means either X or Y.
On Python 3.10 and higher, the | operator
can also be used to denote unions;
X | Y means the same thing to the type checker as Union[X, Y].
To define a union, use e.g. Union[int, str]. Details:
- The arguments must be types and there must be at least one.
- None as an argument is a special case and is replaced by
type(None).
- Unions of unions are flattened, e.g.::
assert Union[Union[int, str], float] == Union[int, str, float]
- Unions of a single argument vanish, e.g.::
assert Union[int] == int # The constructor actually returns int
- Redundant arguments are skipped, e.g.::
assert Union[int, str, int] == Union[int, str]
- When comparing unions, the argument order is ignored, e.g.::
assert Union[int, str] == Union[str, int]
- You cannot subclass or instantiate a union.
- You can use Optional[X] as a shorthand for Union[X, None].
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\query.py
ezdxf.queryparser
Python Library Documentation: module ezdxf.queryparser in ezdxf
NAME
ezdxf.queryparser - EntityQueryParser implemented with the pyparsing module created by Paul T. McGuire.
DESCRIPTION
QueryString := EntityQuery ("[" AttribQuery "]" "i"?)*
The QueryString consist of two queries, first the required entity query and the second optional attribute query,
enclosed in square brackets an optional appended "i" indicates ignore case for string queries.
1. EntityQuery (required)
The EntityQuery is a whitespace separated list of names (DXF entity names) or the special name "*".
2. AttribQuery (optional)
The AttribQuery is a boolean expression, supported boolean operators are:
- '!' not: !term if true, if tern is false.
- '&' and: term & term is true, if both terms are true.
- '|' or: term | term is true, if one term is true.
The query itself consist of a name a comparator and a value, like "color < 7".
Supported comparators are:
- '==': equal
- '!=': not equal
- '<': lower than
- '<=': lower or equal than
- '>': greater than
- '>=': greater or equal than
- '?': match a regular expression
- '!?': does not match a regular expression
Values can be integers, floats or strings, strings have to be quoted ("I am a string" or 'I am a string').
examples:
'LINE CIRCLE[layer=="construction"]' => all LINE and CIRCLE entities on layer "construction"
'*[!(layer=="construction" & color<7)]' => all entities except those on layer == "construction" and color < 7
'LINE[layer=="construction"]i' => all lines on layer named 'construction' with case insensitivity, "CoNsTrUcTiOn" is valid
DATA
AttribName = W:(0-9A-Z_a-z)
AttribQuery = Group:({W:(0-9A-Z_a-z) == | != | <= | < | >= | >...es | ...
AttribQueryOptions = 'i'
AttribValue = {quoted string using single or double quotes | Re:('[+-]...
EntityName = W:(0-9A-Z_a-z)
EntityNames = Group:({{'*' [Re:('[!][\w]+')]...} | {W:(0-9A-Z_a-z)}......
EntityQueryParser = {Group:({{'*' [Re:('[!][\w]+')]...} | {W:(0-9A-Z.....
ExcludeEntityName = Re:('[!][\w]+')
InfixBoolQuery = Forward: '|' term
LBRK = Suppress:('[')
RBRK = Suppress:(']')
Relation = == | != | <= | < | >= | > | ? | !?
__versionTime__ = '06 Mar 2024 07:08 UTC'
__version_time__ = '06 Mar 2024 07:08 UTC'
alphanums = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234...
alphas = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
alphas8bit = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøù...
anyCloseTag = </any tag>
anyOpenTag = <any tag>
any_close_tag = </any tag>
any_open_tag = <any tag>
cStyleComment = C style comment
c_style_comment = C style comment
commonHTMLEntity = common HTML entity
common_html_entity = common HTML entity
cppStyleComment = C++ style comment
cpp_style_comment = C++ style comment
dblQuotedString = string enclosed in double quotes
dblSlashComment = // comment
dbl_quoted_string = string enclosed in double quotes
dbl_slash_comment = // comment
empty = empty
hexnums = '0123456789ABCDEFabcdef'
htmlComment = HTML comment
html_comment = HTML comment
identbodychars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijk...Í...
identchars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstu...ÍÎÏÐÑ...
javaStyleComment = C++ style comment
java_style_comment = C++ style comment
lineEnd = line_end
lineStart = line_start
line_end = line_end
line_start = line_start
number = Re:('[+-]?\d+(:?\.\d*)?(:?[eE][+-]?\d+)?')
nums = '0123456789'
printables = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST...
punc8bit = '¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿×÷'
pythonStyleComment = Python style comment
python_style_comment = Python style comment
quotedString = quoted string using single or double quotes
quoted_string = quoted string using single or double quotes
restOfLine = rest of line
rest_of_line = rest of line
sglQuotedString = string enclosed in single quotes
sgl_quoted_string = string enclosed in single quotes
stringEnd = string_end
stringStart = string_start
string_ = quoted string using single or double quotes
string_end = string_end
string_start = string_start
unicodeString = unicode string literal
unicode_string = unicode string literal
VERSION
3.1.2
AUTHOR
Paul McGuire <ptmcg.gm+pyparsing@gmail.com>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\queryparser.py
ezdxf.read
Python Library Documentation: function read in module ezdxf.filemanagement
read(stream: 'TextIO') -> 'Drawing'
Read a DXF document from a text-stream. Open stream in text mode
(``mode='rt'``) and set correct text encoding, the stream requires at least
a :meth:`readline` method.
Since DXF version R2007 (AC1021) file encoding is always "utf-8",
use the helper function :func:`dxf_stream_info` to detect the required
text encoding for prior DXF versions. To preserve possible binary data in
use :code:`errors='surrogateescape'` as error handler for the import stream.
If this function struggles to load the DXF document and raises a
:class:`DXFStructureError` exception, try the :func:`ezdxf.recover.read`
function to load this corrupt DXF document.
Args:
stream: input text stream opened with correct encoding
Raises:
DXFStructureError: for invalid or corrupted DXF structures
ezdxf.readfile
Python Library Documentation: function readfile in module ezdxf.filemanagement
readfile(filename: 'str | os.PathLike', encoding: 'Optional[str]' = None, errors: 'str' = 'surrogateescape') -> 'Drawing'
Read the DXF document `filename` from the file-system.
This is the preferred method to load existing ASCII or Binary DXF files,
the required text encoding will be detected automatically and decoding
errors will be ignored.
Override encoding detection by setting argument `encoding` to the
estimated encoding. (use Python encoding names like in the :func:`open`
function).
If this function struggles to load the DXF document and raises a
:class:`DXFStructureError` exception, try the :func:`ezdxf.recover.readfile`
function to load this corrupt DXF document.
Args:
filename: filename of the ASCII- or Binary DXF document
encoding: use ``None`` for auto detect (default), or set a specific
encoding like "utf-8", argument is ignored for Binary DXF files
errors: specify decoding error handler
- "surrogateescape" to preserve possible binary data (default)
- "ignore" to use the replacement char U+FFFD "�" for invalid data
- "strict" to raise an :class:`UnicodeDecodeError` exception for invalid data
Raises:
IOError: not a DXF file or file does not exist
DXFStructureError: for invalid or corrupted DXF structures
UnicodeDecodeError: if `errors` is "strict" and a decoding error occurs
ezdxf.readzip
Python Library Documentation: function readzip in module ezdxf.filemanagement
readzip(zipfile: 'str | os.PathLike', filename: 'Optional[str]' = None, errors: 'str' = 'surrogateescape') -> 'Drawing'
Load a DXF document specified by `filename` from a zip archive, or if
`filename` is ``None`` the first DXF document in the zip archive.
Args:
zipfile: name of the zip archive
filename: filename of DXF file, or ``None`` to load the first DXF
document from the zip archive.
errors: specify decoding error handler
- "surrogateescape" to preserve possible binary data (default)
- "ignore" to use the replacement char U+FFFD "�" for invalid data
- "strict" to raise an :class:`UnicodeDecodeError` exception for invalid data
Raises:
IOError: not a DXF file or file does not exist or
if `filename` is ``None`` - no DXF file found
DXFStructureError: for invalid or corrupted DXF structures
UnicodeDecodeError: if `errors` is "strict" and a decoding error occurs
ezdxf.render
Python Library Documentation: package ezdxf.render in ezdxf
NAME
ezdxf.render
DESCRIPTION
# Copyright (c) 2018-2022, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
_linetypes
abstract_mtext_renderer
arrows
curves
dim_base
dim_curved
dim_diameter
dim_linear
dim_ordinate
dim_radius
dimension
forms
hatching
leader
linetypes
mesh
mleader
mline
point
polyline
r12spline
trace
DATA
ARROWS = <ezdxf.render.arrows._Arrows object>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\render\__init__.py
ezdxf.rgb2int
Python Library Documentation: function rgb2int in module ezdxf.colors
rgb2int(rgb: 'RGB | tuple[int, int, int]') -> 'int'
Combined integer value from (r, g, b) tuple.
ezdxf.sections
Python Library Documentation: package ezdxf.sections in ezdxf
NAME
ezdxf.sections
DESCRIPTION
# Copyright (c) 2011-2022, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
acdsdata
blocks
classes
entities
header
headervars
objects
table
tables
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\sections\__init__.py
ezdxf.setup_dimstyle
Python Library Documentation: function setup_dimstyle in module ezdxf.tools.standards
setup_dimstyle(doc: 'Drawing', fmt: 'str', style: 'Optional[str]' = None, blk: 'Optional[str]' = None, name: 'str' = '') -> 'DimStyle'
Easy DimStyle setup, the `fmt` string defines four essential dimension
parameters separated by the `_` character. Tested and works with the metric
system, I don't touch the 'english unit' system.
Example: `fmt` = 'EZ_M_100_H25_CM'
1. '<EZ>_M_100_H25_CM': arbitrary prefix
2. 'EZ_<M>_100_H25_CM': defines the drawing unit, valid values are 'M', 'DM', 'CM', 'MM'
3. 'EZ_M_<100>_H25_CM': defines the scale of the drawing, '100' is for 1:100
4. 'EZ_M_100_<H25>_CM': defines the text height in mm in paper space times 10, 'H25' is 2.5mm
5. 'EZ_M_100_H25_<CM>': defines the units for the measurement text, valid values are 'M', 'DM', 'CM', 'MM'
Args:
doc: DXF drawing
fmt: format string
style: text style for measurement
blk: block name of arrow head, ``None`` for oblique stroke
name: dimension style name, if name is '', `fmt` string is used as name
ezdxf.setup_dimstyles
Python Library Documentation: function setup_dimstyles in module ezdxf.tools.standards setup_dimstyles(doc: 'Drawing', domain: 'str' = 'all') -> 'None'
ezdxf.setup_linetypes
Python Library Documentation: function setup_linetypes in module ezdxf.tools.standards setup_linetypes(doc: 'Drawing') -> 'None'
ezdxf.setup_styles
Python Library Documentation: function setup_styles in module ezdxf.tools.standards setup_styles(doc: 'Drawing') -> 'None'
ezdxf.sys
Python Library Documentation: built-in module sys
NAME
sys
MODULE REFERENCE
https://docs.python.org/3.12/library/sys.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides access to some objects used or maintained by the
interpreter and to functions that interact strongly with the interpreter.
Dynamic objects:
argv -- command line arguments; argv[0] is the script pathname if known
path -- module search path; path[0] is the script directory, else ''
modules -- dictionary of loaded modules
displayhook -- called to show results in an interactive session
excepthook -- called to handle any uncaught exception other than SystemExit
To customize printing in an interactive session or to install a custom
top-level exception handler, assign other functions to replace these.
stdin -- standard input file object; used by input()
stdout -- standard output file object; used by print()
stderr -- standard error object; used for error messages
By assigning other file objects (or objects that behave like files)
to these, it is possible to redirect all of the interpreter's I/O.
last_exc - the last uncaught exception
Only available in an interactive session after a
traceback has been printed.
last_type -- type of last uncaught exception
last_value -- value of last uncaught exception
last_traceback -- traceback of last uncaught exception
These three are the (deprecated) legacy representation of last_exc.
Static objects:
builtin_module_names -- tuple of module names built into this interpreter
copyright -- copyright notice pertaining to this interpreter
exec_prefix -- prefix used to find the machine-specific Python library
executable -- absolute path of the executable binary of the Python interpreter
float_info -- a named tuple with information about the float implementation.
float_repr_style -- string indicating the style of repr() output for floats
hash_info -- a named tuple with information about the hash algorithm.
hexversion -- version information encoded as a single integer
implementation -- Python implementation information.
int_info -- a named tuple with information about the int implementation.
maxsize -- the largest supported length of containers.
maxunicode -- the value of the largest Unicode code point
platform -- platform identifier
prefix -- prefix used to find the Python library
thread_info -- a named tuple with information about the thread implementation.
version -- the version of this interpreter as a string
version_info -- version information as a named tuple
dllhandle -- [Windows only] integer handle of the Python DLL
winver -- [Windows only] version number of the Python DLL
_enablelegacywindowsfsencoding -- [Windows only]
__stdin__ -- the original stdin; don't touch!
__stdout__ -- the original stdout; don't touch!
__stderr__ -- the original stderr; don't touch!
__displayhook__ -- the original displayhook; don't touch!
__excepthook__ -- the original excepthook; don't touch!
Functions:
displayhook() -- print an object to the screen, and save it in builtins._
excepthook() -- print an exception and its traceback to sys.stderr
exception() -- return the current thread's active exception
exc_info() -- return information about the current thread's active exception
exit() -- exit the interpreter by raising SystemExit
getdlopenflags() -- returns flags to be used for dlopen() calls
getprofile() -- get the global profiling function
getrefcount() -- return the reference count for an object (plus one :-)
getrecursionlimit() -- return the max recursion depth for the interpreter
getsizeof() -- return the size of an object in bytes
gettrace() -- get the global debug tracing function
setdlopenflags() -- set the flags to be used for dlopen() calls
setprofile() -- set the global profiling function
setrecursionlimit() -- set the max recursion depth for the interpreter
settrace() -- set the global debug tracing function
SUBMODULES
monitoring
FUNCTIONS
__breakpointhook__ = breakpointhook(...)
breakpointhook(*args, **kws)
This hook function is called by built-in breakpoint().
__displayhook__ = displayhook(object, /)
Print an object to sys.stdout and also save it in builtins._
__excepthook__ = excepthook(exctype, value, traceback, /)
Handle an exception by displaying it with a traceback on sys.stderr.
__unraisablehook__ = unraisablehook(unraisable, /)
Handle an unraisable exception.
The unraisable argument has the following attributes:
* exc_type: Exception type.
* exc_value: Exception value, can be None.
* exc_traceback: Exception traceback, can be None.
* err_msg: Error message, can be None.
* object: Object causing the exception, can be None.
activate_stack_trampoline(backend, /)
Activate stack profiler trampoline *backend*.
addaudithook(hook)
Adds a new audit hook callback.
audit(...)
audit(event, *args)
Passes the event to any audit hooks that are attached.
breakpointhook(...)
breakpointhook(*args, **kws)
This hook function is called by built-in breakpoint().
call_tracing(func, args, /)
Call func(*args), while tracing is enabled.
The tracing state is saved, and restored afterwards. This is intended
to be called from a debugger from a checkpoint, to recursively debug
some other code.
deactivate_stack_trampoline()
Deactivate the current stack profiler trampoline backend.
If no stack profiler is activated, this function has no effect.
displayhook(object, /)
Print an object to sys.stdout and also save it in builtins._
exc_info()
Return current exception information: (type, value, traceback).
Return information about the most recent exception caught by an except
clause in the current stack frame or in an older stack frame.
excepthook(exctype, value, traceback, /)
Handle an exception by displaying it with a traceback on sys.stderr.
exception()
Return the current exception.
Return the most recent exception caught by an except clause
in the current stack frame or in an older stack frame, or None
if no such exception exists.
exit(status=None, /)
Exit the interpreter by raising SystemExit(status).
If the status is omitted or None, it defaults to zero (i.e., success).
If the status is an integer, it will be used as the system exit status.
If it is another kind of object, it will be printed and the system
exit status will be one (i.e., failure).
get_asyncgen_hooks()
Return the installed asynchronous generators hooks.
This returns a namedtuple of the form (firstiter, finalizer).
get_coroutine_origin_tracking_depth()
Check status of origin tracking for coroutine objects in this thread.
get_int_max_str_digits()
Return the maximum string digits limit for non-binary int<->str conversions.
getallocatedblocks()
Return the number of memory blocks currently allocated.
getdefaultencoding()
Return the current default encoding used by the Unicode implementation.
getfilesystemencodeerrors()
Return the error mode used Unicode to OS filename conversion.
getfilesystemencoding()
Return the encoding used to convert Unicode filenames to OS filenames.
getprofile()
Return the profiling function set with sys.setprofile.
See the profiler chapter in the library manual.
getrecursionlimit()
Return the current value of the recursion limit.
The recursion limit is the maximum depth of the Python interpreter
stack. This limit prevents infinite recursion from causing an overflow
of the C stack and crashing Python.
getrefcount(object, /)
Return the reference count of object.
The count returned is generally one higher than you might expect,
because it includes the (temporary) reference as an argument to
getrefcount().
getsizeof(...)
getsizeof(object [, default]) -> int
Return the size of object in bytes.
getswitchinterval()
Return the current thread switch interval; see sys.setswitchinterval().
gettrace()
Return the global debug tracing function set with sys.settrace.
See the debugger chapter in the library manual.
getunicodeinternedsize()
Return the number of elements of the unicode interned dictionary
getwindowsversion()
Return info about the running version of Windows as a named tuple.
The members are named: major, minor, build, platform, service_pack,
service_pack_major, service_pack_minor, suite_mask, product_type and
platform_version. For backward compatibility, only the first 5 items
are available by indexing. All elements are numbers, except
service_pack and platform_type which are strings, and platform_version
which is a 3-tuple. Platform is always 2. Product_type may be 1 for a
workstation, 2 for a domain controller, 3 for a server.
Platform_version is a 3-tuple containing a version number that is
intended for identifying the OS rather than feature detection.
intern(string, /)
``Intern'' the given string.
This enters the string in the (global) table of interned strings whose
purpose is to speed up dictionary lookups. Return the string itself or
the previously interned string object with the same value.
is_finalizing()
Return True if Python is exiting.
is_stack_trampoline_active()
Return *True* if a stack profiler trampoline is active.
set_asyncgen_hooks(...)
set_asyncgen_hooks([firstiter] [, finalizer])
Set a finalizer for async generators objects.
set_coroutine_origin_tracking_depth(depth)
Enable or disable origin tracking for coroutine objects in this thread.
Coroutine objects will track 'depth' frames of traceback information
about where they came from, available in their cr_origin attribute.
Set a depth of 0 to disable.
set_int_max_str_digits(maxdigits)
Set the maximum string digits limit for non-binary int<->str conversions.
setprofile(...)
setprofile(function)
Set the profiling function. It will be called on each function call
and return. See the profiler chapter in the library manual.
setrecursionlimit(limit, /)
Set the maximum depth of the Python interpreter stack to n.
This limit prevents infinite recursion from causing an overflow of the C
stack and crashing Python. The highest possible limit is platform-
dependent.
setswitchinterval(interval, /)
Set the ideal thread switching delay inside the Python interpreter.
The actual frequency of switching threads can be lower if the
interpreter executes long sequences of uninterruptible code
(this is implementation-specific and workload-dependent).
The parameter must represent the desired switching delay in seconds
A typical value is 0.005 (5 milliseconds).
settrace(...)
settrace(function)
Set the global debug tracing function. It will be called on each
function call. See the debugger chapter in the library manual.
unraisablehook(unraisable, /)
Handle an unraisable exception.
The unraisable argument has the following attributes:
* exc_type: Exception type.
* exc_value: Exception value, can be None.
* exc_traceback: Exception traceback, can be None.
* err_msg: Error message, can be None.
* object: Object causing the exception, can be None.
DATA
__stderr__ = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='cp1...
__stdin__ = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8...
__stdout__ = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1...
api_version = 1013
argv = [r'f:\JoeyCodes\PyDocs\py_docs.py', '--worker', 'ezdxf', r'F:\J...
base_exec_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Pyth...
base_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312...
builtin_module_names = ('_abc', '_ast', '_bisect', '_blake2', '_codecs...
byteorder = 'little'
copyright = 'Copyright (c) 2001-2023 Python Software Foundati...ematis...
dllhandle = 140727031824384
dont_write_bytecode = False
exec_prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312...
executable = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312\...
flags = sys.flags(debug=0, inspect=0, interactive=0, opt...ding=0, saf...
float_info = sys.float_info(max=1.7976931348623157e+308, max_...epsilo...
float_repr_style = 'short'
hash_info = sys.hash_info(width=64, modulus=2305843009213693...iphash1...
hexversion = 51119856
implementation = namespace(name='cpython', cache_tag='cpython-312...as...
int_info = sys.int_info(bits_per_digit=30, sizeof_digit=4, ..._str_dig...
maxsize = 9223372036854775807
maxunicode = 1114111
meta_path = [<_distutils_hack.DistutilsMetaFinder object>, <class '_fr...
modules = {'__future__': <module '__future__' from 'C:\\Users\\Youse\\...
orig_argv = [r'C:\Users\Youse\AppData\Local\Programs\Python\Python312\...
path = [r'f:\JoeyCodes\PyDocs', r'C:\Users\Youse\AppData\Local\Program...
path_hooks = [<class 'zipimport.zipimporter'>, <function FileFinder.pa...
path_importer_cache = {r'C:\Users\Youse\AppData\Local\Programs\Python\...
platform = 'win32'
platlibdir = 'DLLs'
prefix = r'C:\Users\Youse\AppData\Local\Programs\Python\Python312'
pycache_prefix = None
stderr = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='cp1252'...
stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
stdlib_module_names = frozenset({'__future__', '_abc', '_aix_support',...
stdout = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'...
thread_info = sys.thread_info(name='nt', lock=None, version=None)
version = '3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v...
version_info = sys.version_info(major=3, minor=12, micro=6, releaselev...
warnoptions = []
winver = '3.12'
FILE
(built-in)
ezdxf.tools
Python Library Documentation: package ezdxf.tools in ezdxf
NAME
ezdxf.tools
DESCRIPTION
# Copyright (c) 2015-2024, Manfred Moitzi
# License: MIT License
PACKAGE CONTENTS
_iso_pattern
analyze
binarydata
clipping_portal
codepage
complex_ltype
crypt
debug
difftags
handle
indexing
juliandate
pattern
rawloader
standards
strip
test
text
text_layout
text_size
zipmanager
FUNCTIONS
float2transparency(value: 'float') -> 'int'
Returns DXF transparency value as integer in the range from ``0`` to ``255``, where
``0`` is 100% transparent and ``255`` is opaque.
Args:
value: transparency value as float in the range from ``0`` to ``1``, where ``0``
is opaque and ``1`` is 100% transparency.
guid() -> 'str'
Returns a general unique ID, based on :func:`uuid.uuid4`.
This function creates a GUID for the header variables $VERSIONGUID and
$FINGERPRINTGUID, which matches the AutoCAD pattern
``{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}``.
normalize_text_angle(angle: 'float', fix_upside_down=True) -> 'float'
Normalizes text `angle` to the range from 0 to 360 degrees and fixes upside down text angles.
Args:
angle: text angle in degrees
fix_upside_down: rotate upside down text angle about 180 degree
pairwise(iterable: 'Iterable[T]', close=False) -> 'Iterator[tuple[T, T]]'
Iterate `iterable` as consecutive overlapping pairs.
This is similar to ``itertools.pairwise()`` in Python 3.10 but with `close` option.
:code:`polygon_segments('ABCDEFG') -> AB BC CD DE EF FG`
:code:`polygon_segments('ABCDEFG', True) -> AB BC CD DE EF FG GA`
set_flag_state(flags: 'int', flag: 'int', state: 'bool' = True) -> 'int'
Set/clear binary `flag` in data `flags`.
Args:
flags: data value
flag: flag to set/clear
state: ``True`` for setting, ``False`` for clearing
suppress_zeros(s: 'str', leading: 'bool' = False, trailing: 'bool' = True)
Suppress trailing and/or leading ``0`` of string `s`.
Args:
s: data string
leading: suppress leading ``0``
trailing: suppress trailing ``0``
take2(iterable: 'Iterable[T]') -> 'Iterator[tuple[T, T]]'
Iterate `iterable` as non-overlapping pairs.
:code:`take2('ABCDEFGH') -> AB CD EF GH`
transparency2float(value: 'int') -> 'float'
Returns transparency value as float from ``0`` to ``1``, ``0`` for no transparency
(opaque) and ``1`` for 100% transparency.
Args:
value: DXF integer transparency value, ``0`` for 100% transparency and ``255``
for opaque
DATA
Iterable = typing.Iterable
A generic version of collections.abc.Iterable.
Iterator = typing.Iterator
A generic version of collections.abc.Iterator.
T = ~T
escape = functools.partial(<function escape at 0x000002460F0E2660>, qu...
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\tools\__init__.py
ezdxf.transparency2float
Python Library Documentation: function transparency2float in module ezdxf.colors
transparency2float(value: 'int') -> 'float'
Returns transparency value as float from 0 to 1, 0 for no transparency
(opaque) and 1 for 100% transparency.
Args:
value: DXF integer transparency value, 0 for 100% transparency and 255
for opaque
ezdxf.units
Python Library Documentation: module ezdxf.units in ezdxf
NAME
ezdxf.units
DESCRIPTION
# Copyright (c) 2019-2023 Manfred Moitzi
# License: MIT License
CLASSES
builtins.object
DrawingUnits
PaperSpaceUnits
class DrawingUnits(builtins.object)
| DrawingUnits(base: float = 1.0, unit: str = 'm')
|
| Methods defined here:
|
| __call__(self, unit: str) -> float
| Call self as a function.
|
| __init__(self, base: float = 1.0, unit: str = 'm')
| Initialize self. See help(type(self)) for accurate signature.
|
| factor(self, unit: str = 'm') -> float
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class PaperSpaceUnits(builtins.object)
| PaperSpaceUnits(msp=<ezdxf.units.DrawingUnits object at 0x000002461846FFB0>, unit: str = 'mm', scale: float = 1)
|
| Methods defined here:
|
| __init__(self, msp=<ezdxf.units.DrawingUnits object at 0x000002461846FFB0>, unit: str = 'mm', scale: float = 1)
| Initialize self. See help(type(self)) for accurate signature.
|
| from_msp(self, value: float, unit: str)
|
| to_msp(self, value: float, unit: str)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
FUNCTIONS
angle_unit_name(enum: int) -> str
Returns the name of the angle unit enum.
conversion_factor(source_units: ezdxf.enums.InsertUnits, target_units: ezdxf.enums.InsertUnits) -> float
Returns the conversion factor to represent `source_units` in
`target_units`.
E.g. millimeter in centimeter :code:`conversion_factor(MM, CM)` returns 0.1,
because 1 mm = 0.1 cm
decode(enum: int) -> Optional[str]
unit_name(enum: int) -> str
Returns the name of the unit enum.
DATA
ANGLE_UNITS = {0: 'Decimal Degrees', 1: 'Degrees/Minutes/Seconds', 2: ...
CM = 5
DM = 14
FT = 2
IMPERIAL_UNITS = {<InsertUnits.Inches: 1>, <InsertUnits.Feet: 2>, <Ins...
IN = 1
KM = 7
M = 6
METER_FACTOR = [None, 39.37007874, 3.280839895, 0.00062137119, 1000.0,...
MI = 3
MM = 4
MSP_METRIC_UNITS_FACTORS = {'cm': 100.0, 'dm': 10.0, 'ft': 3.280839895...
Optional = typing.Optional
Optional[X] is equivalent to Union[X, None].
YD = 10
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\ezdxf\units.py
ezdxf.version
Python Library Documentation: tuple object class tuple(object) | tuple(iterable=(), /) | | Built-in immutable sequence. | | If no argument is given, the constructor returns an empty tuple. | If iterable is specified the tuple is initialized from iterable's items. | | If the argument is a tuple, the return value is the same object. | | Built-in subclasses: | asyncgen_hooks | UnraisableHookArgs | | Methods defined here: | | __add__(self, value, /) | Return self+value. | | __contains__(self, key, /) | Return bool(key in self). | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, key, /) | Return self[key]. | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | __rmul__(self, value, /) | Return value*self. | | count(self, value, /) | Return number of occurrences of value. | | index(self, value, start=0, stop=9223372036854775807, /) | Return first index of value. | | Raises ValueError if the value is not present. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature.