科学计算三维可视化---TraitsUI的介绍

it2022-05-05  166

TraitsUI的介绍

Python中存在Tkinter,wxPython,pyQt4等GUI图像界面编写库,这三类库要求程序员掌握众多的GUI API函数 对于科学计算的应用来说,我们希望可以快速的开发界面,能够交互的处理程序,而不需要花很多精力在界面响应上,那么TraitsUI就是一个理想的选择 TraitsUI:   以traits为基础   以MVC为设计思想  (实现动态程序设计,简化了程序的扩展工作,使程序的各个部分都能够被充分利用)

 安装测试

pip3 install traitsUI from traitsui.api import View

界面使用方法

TraitsUI是建立在traits库基础上的界面管理库,其最简单的界面方法就是继承HasTraits类,使用configure_traits方法

from traits.api import HasTraits,Int,Str class ModelManager(HasTraits): model_name = Str category = Str model_file = Str model_number = Int model = ModelManager() model.configure_traits()

 

转载于:https://www.cnblogs.com/ssyfj/p/9309218.html

相关资源:Coin3D三维可视化开发包

最新回复(0)