⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simple.py

📁 使用Pygtk写的几个例子
💻 PY
字号:
#!/usr/bin/env python# translation of the simple.c test in the gtk+ distribution, using the# new() function from gobject (this is an example of creating objects# with the properties interface).import gobject, gtkdef hello(*args):    print "Hello World"    window.destroy()def destroy(*args):    window.hide()    gtk.main_quit()window = gobject.new(gtk.Window,                     type=gtk.WINDOW_TOPLEVEL,                     title='Hello World',                     allow_grow=False,                     allow_shrink=False,                     border_width=10)window.connect("destroy", destroy)button = gobject.new(gtk.Button, label="Hello World", parent=window)button.connect("clicked", hello)window.show_all()gtk.main()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -