util package

Submodules

util.config module

util.config_helper module

class util.config_helper.ConfigHelper(config_path, username, password, system_root_path)[源代码]

基类:object

处理软件系统设置相关的文件存储与读取类

data_load()[源代码]

从本地的配置文件加载数据

data_write()[源代码]

向给定的配置文件地址写入数据

get_password()[源代码]

获取网络学堂的的密码

get_root_path()[源代码]

获取软件中文件系统对应的地址字典,文件系统名字为键,文件系统根目录绝对路径为值

get_username()[源代码]

获取网络学堂的的用户名

util.database_helper module

class util.database_helper.DatabaseHelper(datapath_path)[源代码]

基类:object

数据库操作类,用于存储tag信息

node_tag_write(node)[源代码]

指定节点,将其tag存储至数据库中

参数

node (FileNode) -- 需要存储的文件节点

指定需要搜索的tag, 在数据库中进行搜索并返回搜索结果列表

参数

tag (String) -- 给定的搜索tag名称

tree_tag_write(tree)[源代码]

指定文件树,将其tag存储至数据库中

参数

tree (FileTree) -- 需要存储的文件树

util.error_helper module

class util.error_helper.ErrorHelprt[源代码]

基类:object

error_handler()[源代码]

处理错误信息

util.file_node module

util.file_tree module

util.net_helper module

util.node module

util.string_helper module

util.tree module

util.ui_branch module

util.ui_node module

util.ui_tree module

util.xml_helper module

class util.xml_helper.XmlHelper[源代码]

基类:object

add_node(node, father)[源代码]

给定一个node节点和一个父亲节点,将node插入到父亲节点下

参数
  • node (Node) -- 一个需要插入的节点,将在XML文件中其插入到父亲节点(father)下

  • father (Node) -- 文件树中待插入的节点

parse_xml(file_path, file_name)[源代码]

给定xml文件地址以及xml文件名,解析这个文件为一棵树

参数
  • file_path (String) -- xml文件的地址

  • file_name (String) -- xml文件的文件名

返回

xml树(未处理为文件树)

返回类型

ElementTree

xml_generate(file_name, file_path)[源代码]

给定文件名生成一个xml文件,用于存储UI树结构或者File 树结构

参数
  • file_name (String) -- 生成的XML文件文件名

  • file_path (String) -- 生成的XML文件文件绝对路径

Module contents