当前位置: 首页>>代码示例>>Python>>正文


Python PutGetXML.get_coords_from_xml方法代码示例

本文整理汇总了Python中Modules.Core.Utilities.xml_tools.PutGetXML.get_coords_from_xml方法的典型用法代码示例。如果您正苦于以下问题:Python PutGetXML.get_coords_from_xml方法的具体用法?Python PutGetXML.get_coords_from_xml怎么用?Python PutGetXML.get_coords_from_xml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Modules.Core.Utilities.xml_tools.PutGetXML的用法示例。


在下文中一共展示了PutGetXML.get_coords_from_xml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: read_one_room

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_coords_from_xml [as 别名]
 def read_one_room(p_room_element):
     l_room_obj = RoomData()
     try:
         XmlConfigTools.read_base_UUID_object_xml(l_room_obj, p_room_element)
         l_room_obj.Comment = PutGetXML.get_text_from_xml(p_room_element, 'Comment')
         l_room_obj.Corner = PutGetXML.get_coords_from_xml(p_room_element, 'Corner')
         l_room_obj.Floor = PutGetXML.get_text_from_xml(p_room_element, 'Floor', '1')
         l_room_obj.LastUpdate = PutGetXML.get_date_time_from_xml(p_room_element, 'LastUpdate')
         l_room_obj.Size = PutGetXML.get_coords_from_xml(p_room_element, 'Size')
         l_room_obj.RoomType = PutGetXML.get_text_from_xml(p_room_element, 'RoomType')
     except:
         LOG.warn('Incomplete data for room {}'.format(l_room_obj.Name))
     return l_room_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:15,代码来源:rooms.py

示例2: read_room_reference_xml

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_coords_from_xml [as 别名]
def read_room_reference_xml(p_obj, p_xml):
    """ Since many different XML routines need this - it is factored out here.
    It will use the XML in a configuration file to gather the room information.
    @param p_obj: is the object that will have the room information from the XML added.
    @param p_xml: is the XML that has the room information as sub elements
    """
    p_obj.RoomCoords = PutGetXML.get_coords_from_xml(p_xml, 'RoomCoords')
    p_obj.RoomName = PutGetXML.get_text_from_xml(p_xml, 'RoomName')
    p_obj.RoomUUID = PutGetXML.get_uuid_from_xml(p_xml, 'RoomUUID')
    return p_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:12,代码来源:utils.py

示例3: _read_light_data

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_coords_from_xml [as 别名]
 def _read_light_data(_p_pyhouse_obj, p_obj, p_xml):
     p_obj.Comment = PutGetXML.get_text_from_xml(p_xml, 'Comment')
     if (p_xml.find('Brightness') != None):
         p_obj.BrightnessPct = PutGetXML.get_int_from_xml(p_xml, 'Brightness', 44)
     else:
         p_obj.BrightnessPct = PutGetXML.get_int_from_xml(p_xml, 'CurLevel', 45)
     p_obj.IsDimmable = PutGetXML.get_bool_from_xml(p_xml, 'IsDimmable', False)
     p_obj.DeviceType = PutGetXML.get_int_from_xml(p_xml, 'DeviceType', 41)
     p_obj.DeviceSubType = PutGetXML.get_int_from_xml(p_xml, 'DeviceSubType', 43)
     p_obj.RoomName = PutGetXML.get_text_from_xml(p_xml, 'RoomName')
     p_obj.RoomUUID = PutGetXML.get_uuid_from_xml(p_xml, 'RoomUUID')
     p_obj.RoomCoords = PutGetXML.get_coords_from_xml(p_xml, 'RoomCoords')
     return p_obj  # for testing
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:15,代码来源:lighting_lights.py


注:本文中的Modules.Core.Utilities.xml_tools.PutGetXML.get_coords_from_xml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。