分页: 62/122 第一页 上页 57 58 59 60 61 62 63 64 65 66 下页 最后页 [ 显示模式: 摘要 | 列表 ]
    在程序中使用配置文件来灵活的配置一些参数是一件很常见的事情,配置文件的解析并不复杂,在python里更是如此,在官方发布的库中就包含有做这件事情的库,那就是ConfigParser,这里简单的做一些介绍。
    ConfigParser解析的配置文件的格式比较象ini的配置文件格式,就是文件中由多个section构成,每个section下又有多个配置项,比如:
引用

[db]
db_host=127.0.0.1
db_port=3306
db_user=root
db_pass=password
[concurrent]
thread=10
processor=20

    假设上面的配置文件的名字为test.conf。里面包含两个section,一个是db, 另一个是concurrent, db里面还包含有4项,concurrent里面有两项。这里来做做解析:

wxpython之Hyperlinks 不指定

root , 2008/05/22 21:27 , Python , 评论(0) , 阅读(6306) , Via 本站原创
Hyperlinks
AppSnap displays the website of an application amongst other details. It would be ideal to open the link in the default browser when clicked. Luckily for us, wxPython has a widget just for this.

Let’s create a hyperlink:

# Create hyperlink on an existing panel widget
link = wx.lib.hyperlink.HyperLinkCtrl(parent=panel, pos=(225, 60))

For starters, let’s initialize the link.

# Initialize the hyperlink
link.SetURL(URL=”)
link.SetLabel(label=”)
link.SetToolTipString(tip=”)
Tags:
分页: 62/122 第一页 上页 57 58 59 60 61 62 63 64 65 66 下页 最后页 [ 显示模式: 摘要 | 列表 ]