#Python 真是无法保证这样复杂的时序写对…… 在有了Kotlin以后我不会在区间开闭上出错 但时序变量更新还真不能保证。(据说bug还是因为我顺手简化"无用赋值"导致的) 我不想写下去了,花了好大精力还熬了三天夜……刚刚有点好转
总感觉可以优化,总感觉看着让人觉得要删掉,可按顺序看看倒也没什么,可是关键在于把它删掉看着也没什么…… 直觉要好啊
注:是指
注:是指
expr = get() ; if (expr == null) { expr = get1(); if (expr != null) bla() } 这种看起来怎么这么相似的我准备发布了,发布后就会死掉。 不过对我来说这个无所谓(
加了一些东西(command 参数的 self 的编号, dict.findKey) 又因为实现不了而删了,心里不开心,现在放假了。
加了一些东西(command 参数的 self 的编号, dict.findKey) 又因为实现不了而删了,心里不开心,现在放假了。
看来只能用很脏的全局变量了…… 反正组件树是后序遍历的,那它依赖 但要调用创建它 所以必须提前的东西 就只能用全局变量了…… 不知道会不会有数据竞争之类的问题(但如果有说明应用的代码太飘了……)
有了这个以后,不知道 Codegen 的 autoExpr 该不该留,我想如果出于一些非常迷的目的(比如说 简写法),删代码真和割肉一样斟酌。。。
有了这个以后,不知道 Codegen 的 autoExpr 该不该留,我想如果出于一些非常迷的目的(比如说 简写法),删代码真和割肉一样斟酌。。。
真的不知道这样瘸腿的设计如何做到正确codegen…… 一般来说是有个区域限制的吧,比如某个 window 内codegen就只能访问它的上下文,所以不用处理命名冲突,但我对这个奇葩代码生成方法理解的本来就不深刻,只是想拿它简化代码而已…… (而且我真是不想加任何限制虽然原理的编程建模本身有功能限制)
真不知道这个框架什么时候会变成 Python 里最好的,感觉可以拼一下?喵。
https://github.com/duangsuse-valid-projects/TkGUI
真不知道这个框架什么时候会变成 Python 里最好的,感觉可以拼一下?喵。
https://github.com/duangsuse-valid-projects/TkGUI
GitHub
GitHub - duangsuse-valid-projects/TkGUI: Declarative tkinter wrapper for Python, features quick prototype & codegen
Declarative tkinter wrapper for Python, features quick prototype & codegen - duangsuse-valid-projects/TkGUI
今天终于可以早点睡了……(而且以后几天都不会有出产,真可惜)
下面来列举一些 Python 的 GUI 工具/框架,从 PyPI 找的
https://github.com/alejandroautalan/pygubu
Pygubu is a RAD tool to enable quick and easy development of user interfaces for the Python's tkinter module inspired by Glade. (UI Designer)
https://pypi.org/project/sgui/
A simple GUI library for Python, wrapper around Tkinter In the future, backends for other languages like [pyside2](http://wiki.qt.io/Qt_for_Python) may be added.
https://pypi.org/project/ttkwidgets/
A collection of widgets for Tkinter’s ttk extensions by various authors (updated)
https://pypi.org/project/uielem/
wrapper over Tkinter for more Pythonic UI building
https://pypi.org/project/tkintertoy/
Tkintertoy was designed to be a easy to use GUI library based on Tkinter. It was intended for "young"
https://pypi.org/project/dearpygui/
http://www.codeskulptor.org/
SimpleGUITk is a wrapper for the CodeSkulptor SimpleGUI API using TkInter
https://github.com/TaylorSMarks/FinGUI
A Pythonic Wrapper for Tkinter
https://bitbucket.org/svenrahmann/geniegui/src/master/geniegui.py
Python GUI generator. Automatically generate tkinter GUI applicatons from argparse objects.
有意思。但没有实例和截图的项目别人是不会看的。
https://pypi.org/project/tkup/
tkup is a thin wrapper around standard Tkinter widgets, allowing you to write code that visually reflects the widget hierarchy, helps you use normal Tkinter in a streamlined way.
这个开发者的思想和我一样都是定义式,但他选的方式我不太喜欢,毕竟 vararg 是几乎什么语言都有的,但 with (类似try-with-resource但有__enter__事件) 可不是哪都能移植,而且它还必须用副作用构造控件树
https://github.com/Mandera/generalgui
Extends and simplifies tkinter functionality with built-in QoL improvements.
是基于 App, Page, Element 的 Tkinter 封装,它重命名了一些控件并且简化封装grid等,不是所有控件都支持。
https://github.com/duangsuse-valid-projects/TkGUI
Declarative tkinter wrapper for Python, features quick prototype and (dynamic type, "implicit") codegen.
我最喜欢的当然是自己造的了…… 以后codegen完善了就能缓存结果降低开销(zero cost abstraction! 虽然是Python...),而且支持更多 GUI 框架后可以跨语言代码生成, 虽然估计不会再动codegen部分
https://github.com/Akuli/teek
Teek is a pythonic and user-friendly alternative to tkinter
Teek 是把 tkinter 整个重写了一遍,而且从 event loop 支持了视图的异步变动, TkGUI 从里面抄了不少东西,不过没抄不区分 Tk main 和 Toplevel 窗口的,之前我觉得没必要不区分(所以只能从 main 窗口 quit 什么的...),以后如果重写我会接受平等窗口的概念 (不像 Tk 到处 master slave ,呵呵)
https://uiutil.readthedocs.io/en/latest/summary.html dead?
下面来列举一些 Python 的 GUI 工具/框架,从 PyPI 找的
https://github.com/alejandroautalan/pygubu
Pygubu is a RAD tool to enable quick and easy development of user interfaces for the Python's tkinter module inspired by Glade. (UI Designer)
https://pypi.org/project/sgui/
A simple GUI library for Python, wrapper around Tkinter In the future, backends for other languages like [pyside2](http://wiki.qt.io/Qt_for_Python) may be added.
mainBox = sgui.VBox(window)(我也一样!反正我是真想加GTK的后端,因为它好看啊,但不好写...)
sgui.Label(mainBox, string = "Text")
https://pypi.org/project/ttkwidgets/
A collection of widgets for Tkinter’s ttk extensions by various authors (updated)
https://pypi.org/project/uielem/
wrapper over Tkinter for more Pythonic UI building
uiroot = UI(Tk, name='root', title='Kanban', children=[UI(Button, text='Add item', command=add)])不太好看,不过我估计这个作者纯元编程封装很省力。(还好咱加了代码生成后也元编程了,而且还0抽象开销+代码生成本身无需重复代码,动态类型才叫Pythonic。嘿嘿)
uiroot.makeelem()
uidict["root"].mainloop()
https://pypi.org/project/tkintertoy/
Tkintertoy was designed to be a easy to use GUI library based on Tkinter. It was intended for "young"
gui = Window()这个虽好但不喜欢,如果光说。 看后面有个严重减分项:
gui.setTitle('My First Tkintertoy GUI!')
gui.addEntry('name', 'Type in your name')
gui.plot('name', row=0)
while True:如果从视图定义方式来看,类似 ImGui :
gui.waitforUser()
if gui.content: gui.set('welcome', 'Welcome ' + gui.get('name'))
https://pypi.org/project/dearpygui/
add_text("Hello world")
add_button("Save", callback="save_callback")
https://github.com/dholm/simpleguitk/http://www.codeskulptor.org/
SimpleGUITk is a wrapper for the CodeSkulptor SimpleGUI API using TkInter
frame = simplegui.create_frame("Home", 300, 200)
frame.add_button("Click me", click)
frame.set_draw_handler(draw)
支持浏览器环境和 paint 事件,加分!https://github.com/TaylorSMarks/FinGUI
A Pythonic Wrapper for Tkinter
from fingui import Entry感觉对全局环境和 mutate(set) 方法的依赖太严重,不作评价
e = Entry()
e.set('Hello World!') # no need to call mainloop
https://bitbucket.org/svenrahmann/geniegui/src/master/geniegui.py
Python GUI generator. Automatically generate tkinter GUI applicatons from argparse objects.
有意思。但没有实例和截图的项目别人是不会看的。
https://pypi.org/project/tkup/
tkup is a thin wrapper around standard Tkinter widgets, allowing you to write code that visually reflects the widget hierarchy, helps you use normal Tkinter in a streamlined way.
这个开发者的思想和我一样都是定义式,但他选的方式我不太喜欢,毕竟 vararg 是几乎什么语言都有的,但 with (类似try-with-resource但有__enter__事件) 可不是哪都能移植,而且它还必须用副作用构造控件树
https://github.com/Mandera/generalgui
Extends and simplifies tkinter functionality with built-in QoL improvements.
是基于 App, Page, Element 的 Tkinter 封装,它重命名了一些控件并且简化封装grid等,不是所有控件都支持。
https://github.com/duangsuse-valid-projects/TkGUI
Declarative tkinter wrapper for Python, features quick prototype and (dynamic type, "implicit") codegen.
我最喜欢的当然是自己造的了…… 以后codegen完善了就能缓存结果降低开销(zero cost abstraction! 虽然是Python...),而且支持更多 GUI 框架后可以跨语言代码生成, 虽然估计不会再动codegen部分
https://github.com/Akuli/teek
Teek is a pythonic and user-friendly alternative to tkinter
Teek 是把 tkinter 整个重写了一遍,而且从 event loop 支持了视图的异步变动, TkGUI 从里面抄了不少东西,不过没抄不区分 Tk main 和 Toplevel 窗口的,之前我觉得没必要不区分(所以只能从 main 窗口 quit 什么的...),以后如果重写我会接受平等窗口的概念 (不像 Tk 到处 master slave ,呵呵)
https://uiutil.readthedocs.io/en/latest/summary.html dead?
GitHub
GitHub - alejandroautalan/pygubu: A simple GUI builder for the python tkinter module
A simple GUI builder for the python tkinter module - alejandroautalan/pygubu