本文整理汇总了Python中serializable.serialize_object函数的典型用法代码示例。如果您正苦于以下问题:Python serialize_object函数的具体用法?Python serialize_object怎么用?Python serialize_object使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了serialize_object函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ping
def ping(self, data):
flag = isinstance(data, serializable.Serializable)
if flag:
data = serializable.serialize_object(data)
data = self.__ibus.Ping(data, dbus_interface="org.freedesktop.IBus")
if flag:
data = serializable.deserialize_object(data)
return data
示例2: set_surrounding_text
def set_surrounding_text(self, text, cursor_pos):
if self.__surrounding_text.get_text() != text or \
self.__surrounding_cursor_pos != cursor_pos:
self.__surrounding_text = Text(text)
self.__surrounding_cursor_pos = cursor_pos
text = serializable.serialize_object(self.__surrounding_text)
cursor_pos = dbus.UInt32(self.__surrounding_cursor_pos)
self.__context.SetSurroundingText(text, cursor_pos)
示例3: update_property
def update_property(self, prop):
dbus_values = serializable.serialize_object(prop)
return self.__proxy.UpdateProperty(dbus_values)
示例4: register_properties
def register_properties(self, props):
dbus_values = serializable.serialize_object(props)
return self.__proxy.RegisterProperties(dbus_values)
示例5: update_lookup_table
def update_lookup_table(self, lookup_table, visible, just_current_page = False):
if just_current_page:
lookup_table = lookup_table.get_current_page_as_lookup_table()
dbus_values = serializable.serialize_object(lookup_table)
return self.__proxy.UpdateLookupTable(dbus_values, visible)
示例6: update_auxiliary_text
def update_auxiliary_text(self, text, visible):
text = serializable.serialize_object(text)
return self.__proxy.UpdateAuxiliaryText(text, visible)
示例7: update_preedit_text
def update_preedit_text(self, text, cursor_pos, visible, mode=common.IBUS_ENGINE_PREEDIT_CLEAR):
text = serializable.serialize_object(text)
return self.__proxy.UpdatePreeditText(text, cursor_pos, visible, mode)
示例8: commit_text
def commit_text(self, text):
text = serializable.serialize_object(text)
return self.__proxy.CommitText(text)
示例9: register_component
def register_component(self, component):
component = serializable.serialize_object(component)
return self.__ibus.RegisterComponent(component)
示例10: update_preedit_text
def update_preedit_text(self, text, cursor_pos, visible):
text = serializable.serialize_object(text)
return self.__proxy.UpdatePreeditText(text, cursor_pos, visible)