update nxopen.py
update nxopen_cam.py 导出API内容不再在导出内容中生成注释,防止知识库被注释污染.注释仅存在于导出脚本中.方便于生产使用
This commit is contained in:
parent
c25092f39f
commit
99f53e2ae1
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,4 @@
|
||||
#----------ban words:-----------
|
||||
__
|
||||
_
|
||||
method_descriptor
|
||||
getset_descriptor
|
||||
builtin_function_or_method
|
||||
-------------------------------------
|
||||
#屏蔽以上内容方便API的阅读,被屏蔽掉的内容作者认为是python内置或者绑定函数,对象,成员.阅读意义不大
|
||||
#-------------module name: NXOpen.CAM-------------
|
||||
module name: NXOpen.CAM
|
||||
func name: NXOpen.CAM.AcrossVoids
|
||||
member name:MinTraverseDistance
|
||||
member name:MotionType
|
||||
|
@ -17,11 +17,11 @@ lw = session.ListingWindow
|
||||
lw.Open()
|
||||
|
||||
# 定义要检查的模块列表,具体要检查的模块自行设定,不建议设置太多模块同时导出,会卡死你的!
|
||||
modules = [NXOpen.CAM]
|
||||
modules = [NXOpen]
|
||||
|
||||
def main():
|
||||
for module in modules:
|
||||
lw.WriteLine(f"#-------------module name: {module.__name__}-------------")
|
||||
lw.WriteLine(f"module name: {module.__name__}")
|
||||
func = inspect.getmembers(module)
|
||||
for func_name,func_obj in func:
|
||||
# 过滤掉以双下划线开头的成员
|
||||
@ -46,12 +46,12 @@ def main():
|
||||
lw.WriteLine(f" attr type: {attr}")
|
||||
|
||||
if __name__ == '__main__':
|
||||
lw.WriteLine(f"#----------ban words:-----------")
|
||||
lw.WriteLine(f"__")
|
||||
lw.WriteLine(f"_")
|
||||
lw.WriteLine(f"method_descriptor")
|
||||
lw.WriteLine(f"getset_descriptor")
|
||||
lw.WriteLine(f"builtin_function_or_method")
|
||||
lw.WriteLine(f"-------------------------------------")
|
||||
lw.WriteLine(f"#屏蔽以上内容方便API的阅读,被屏蔽掉的内容作者认为是python内置或者绑定函数,对象,成员.阅读意义不大")
|
||||
"#----------ban words:-----------"
|
||||
"__"
|
||||
"_"
|
||||
"method_descriptor"
|
||||
"getset_descriptor"
|
||||
"builtin_function_or_method"
|
||||
"-------------------------------------"
|
||||
"#屏蔽以上内容方便API的阅读,被屏蔽掉的内容作者认为是python内置或者绑定函数,对象,成员.阅读意义不大"
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user