摘要: import xmind class AddXmind: def __init__(self, topic_name: str, path: str): self.topic_name = topic_name # 主题名称 self.path = path # 绝对路径 def add(self, 阅读全文
posted @ 2023-10-11 16:05 公子Learningcarer 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 我的案例 方法: # 函数公共配置 def debug_function(debug_req, function_text): try: exec(function_text) re = eval(debug_req) return {'code': 200, 'msg': '获取成功', 'dat 阅读全文
posted @ 2023-10-11 12:50 公子Learningcarer 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1.概述 如果你在操作字符串,如果你操作的字符串内容很多,希望字符串中的内容能够根据规则动态替换,并且在长篇幅的字符串中需要替换任意位置任意次数的字符,使用str提供的replace方法代码会写的非常复杂,且出错不易排查。 在这个场景中试试Template类把,他能够创建一个模板替换字符串。 1.1 阅读全文
posted @ 2023-10-11 12:13 公子Learningcarer 阅读(341) 评论(0) 推荐(0) 编辑