# Path: core/ezdxf/tools/c23.py
# PY3 = sys.version_info.major > 2
# def isstring(s):
# 
# Path: core/ezdxf/lldxf/types.py
# def strtag(tag):
#     return TAG_STRING_FORMAT % tag
# 
# Path: core/ezdxf/lldxf/tags.py
# COMMENT_CODE = 999
# def write_tags(stream, tags):
# def text2tags(text):
#     def __init__(self):
#     def DWGCODEPAGE(self, value):
#     def ACADVER(self, value):
#     def HANDSEED(self, value):
# def dxf_info(stream):
#     def write(self, stream):
#     def from_text(cls, text):
#     def __copy__(self):
#     def get_handle(self):
#     def replace_handle(self, new_handle):
#     def dxftype(self):
#     def has_tag(self, code):
#     def find_first(self, code, default=ValueError):
#     def get_first_tag(self, code, default=ValueError):
#     def find_all(self, code):
#     def tag_index(self, code, start=0, end=None):
#     def update(self, code, value):
#     def set_first(self, code, value):
#     def remove_tags(self, codes):
#     def collect_consecutive_tags(self, codes, start=0, end=None):
#     def __init__(self, tags, splitcode=0):
#     def _build_groups(self, tags, splitcode):
#         def append(tag):  # first do nothing, skip tags in front of the first split tag
#     def get_name(self, index):
#     def from_text(cls, text, splitcode=0):
# def strip_tags(tags, codes):
#     def __init__(self, code, tags):
#     def __getitem__(self, item):
#     def decompress(self):
#     def write(self, stream):
# class DXFInfo(object):
# class Tags(list):
# class TagGroups(list):
# class CompressedTags(object):


from collections import OrderedDict
from ..tools.c23 import ustr
from ..lldxf.types import strtag
from ..lldxf.tags import TagGroups, Tags, DXFStructureError

    def __setitem__(self, key, value):
        tags = self._headervar_factory(key, value)
        self.hdrvars[key] = HeaderVar(tags)

    def __delitem__(self, key):
        del self.hdrvars[key]


class HeaderVar:
    def __init__(self, tag):
        self.tag = tag

    @property
    def code(self):
        return self.tag[0]

    @property
    def value(self):
        return self.tag[1]

    @property
    def ispoint(self):
        return self.code == 10

    def __str__(self):
        if self.ispoint:
            code, value = self.tag
            s = []
            for coord in value:

# Path: core/ezdxf/tools/c23.py
# PY3 = sys.version_info.major > 2
# def isstring(s):
# 
# Path: core/ezdxf/lldxf/types.py
# def strtag(tag):
#     return TAG_STRING_FORMAT % tag
# 
# Path: core/ezdxf/lldxf/tags.py
# COMMENT_CODE = 999
# def write_tags(stream, tags):
# def text2tags(text):
#     def __init__(self):
#     def DWGCODEPAGE(self, value):
#     def ACADVER(self, value):
#     def HANDSEED(self, value):
# def dxf_info(stream):
#     def write(self, stream):
#     def from_text(cls, text):
#     def __copy__(self):
#     def get_handle(self):
#     def replace_handle(self, new_handle):
#     def dxftype(self):
#     def has_tag(self, code):
#     def find_first(self, code, default=ValueError):
#     def get_first_tag(self, code, default=ValueError):
#     def find_all(self, code):
#     def tag_index(self, code, start=0, end=None):
#     def update(self, code, value):
#     def set_first(self, code, value):
#     def remove_tags(self, codes):
#     def collect_consecutive_tags(self, codes, start=0, end=None):
#     def __init__(self, tags, splitcode=0):
#     def _build_groups(self, tags, splitcode):
#         def append(tag):  # first do nothing, skip tags in front of the first split tag
#     def get_name(self, index):
#     def from_text(cls, text, splitcode=0):
# def strip_tags(tags, codes):
#     def __init__(self, code, tags):
#     def __getitem__(self, item):
#     def decompress(self):
#     def write(self, stream):
# class DXFInfo(object):
# class Tags(list):
# class TagGroups(list):
# class CompressedTags(object):


# Path: core/ezdxf/sections/header.py
from collections import OrderedDict
from ..tools.c23 import ustr
from ..lldxf.types import strtag
from ..lldxf.tags import TagGroups, Tags, DXFStructureError


    def __setitem__(self, key, value):
        tags = self._headervar_factory(key, value)
        self.hdrvars[key] = HeaderVar(tags)

    def __delitem__(self, key):
        del self.hdrvars[key]


class HeaderVar:
    def __init__(self, tag):
        self.tag = tag

    @property
    def code(self):
        return self.tag[0]

    @property
    def value(self):
        return self.tag[1]

    @property
    def ispoint(self):
        return self.code == 10

    def __str__(self):
        if self.ispoint:
            code, value = self.tag
            s = []
            for coord in value:

                s.append(strtag((code, coord)))