wkt
发表于 2006-6-22 21:06:05
小调查:
* 用Magic Linux的朋友有多少人在用Python编程?
* 有多少在学习和准备学习Python编程?
* 有多少在学习Python的GUI编程?
* 有多少人需要wxPython?
我已经为Magic Linux(基于2.0.1)打包了wxPython-2.6.3.2,明天会上传到服务器,希望大家能帮忙测试
不好意思 我都没有听说过!
目前,我知道c/c++ 还有java 这些编程语言!(或许还有shell)
当然,最喜欢c了
正在学习中!
heyuqi
发表于 2006-6-22 23:05:54
wkt, 建议你去了解了解,这是一门优美的语言,只不过国内流行总比国外的慢半怕。
现在很多 linux 的配置程序都是用 python 写的。
:mrgreen:
wkt
发表于 2006-6-22 23:22:39
好!
我可以找一下
一些文章看看
希望python的语法不要太复杂!
lvscar
发表于 2006-6-23 00:49:42
支持wxpython
lvscar
发表于 2006-6-23 00:50:05
我最近一直在联系写 wxpython程序
haulm
发表于 2006-6-23 07:21:35
不知为何一直不能正常使用:
File "a.py", line 2
class MyApp(wx.App):
官方的例子却可以运行,而书上的例子全部不能运行 。。。
haulm
发表于 2006-6-23 09:47:39
#!/usr/bin/env python
# -*- coding: gb18030 -*-
import wx
# Create a new frame class, derived from the wxPython Frame.
class MyFrame(wx.Frame):
def __init__(self, parent, id, title):
# First, call the base class' __init__ method to create the frame
wx.Frame.__init__(self, parent, id, title)
# Associate some events with methods of this class
self.Bind(wx.EVT_SIZE, self.OnSize)
self.Bind(wx.EVT_MOVE, self.OnMove)
# Add a panel and some controls to display the size and position
panel = wx.Panel(self, -1)
label1 = wx.StaticText(panel, -1, "尺寸:")
label2 = wx.StaticText(panel, -1, "位置:")
self.sizeCtrl = wx.TextCtrl(panel, -1, "", style=wx.TE_READONLY)
self.posCtrl = wx.TextCtrl(panel, -1, "", style=wx.TE_READONLY)
self.panel = panel
# Use some sizers for layout of the widgets
sizer = wx.FlexGridSizer(2, 2, 5, 5)
sizer.Add(label1)
sizer.Add(self.sizeCtrl)
sizer.Add(label2)
sizer.Add(self.posCtrl)
border = wx.BoxSizer()
border.Add(sizer, 0, wx.ALL, 15)
panel.SetSizerAndFit(border)
self.Fit()
# This method is called by the System when the window is resized,
# because of the association above.
def OnSize(self, event):
size = event.GetSize()
self.sizeCtrl.SetValue("%s, %s" % (size.width, size.height))
# tell the event system to continue looking for an event handler,
# so the default handler will get called.
event.Skip()
# This method is called by the System when the window is moved,
# because of the association above.
def OnMove(self, event):
pos = event.GetPosition()
self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y))
# Every wxWidgets application must have a class derived from wx.App
class MyApp(wx.App):
# wxWindows calls this method to initialize the application
def OnInit(self):
# Create an instance of our customized Frame class
frame = MyFrame(None, -1, "测试一")
frame.Show(True)
# Tell wxWindows that this is our main window
self.SetTopWindow(frame)
# Return a success flag
return True
app = MyApp(0) # Create an instance of the application class
app.MainLoop() # Tell it to start processing events
superman
发表于 2006-6-23 16:28:53
偶26了才学编程,是不是老了
npcomet
发表于 2006-6-23 16:47:06
偶26了才学编程,是不是老了
不老
努力就好
MichaelBibby
发表于 2006-6-23 17:53:41
#!/usr/bin/env python
# -*- coding: gb18030 -*-
import wx
你的这个代码我这里可以运行的(注意缩进代码块)
haulm
发表于 2006-6-23 18:21:09
能运行才帖出来,晕死:mrgreen:
MichaelBibby
发表于 2006-6-23 18:57:08
能运行才帖出来,晕死:mrgreen:晕死,还以为你的不行呢,你小子居然一句话不说,就帖段代码上来,“继承”你上一个帖子的内容,我就以为是有问题的了。。。 :?
haulm
发表于 2006-6-25 02:27:22
http://www.magiclinux.org/people/haulm/RPMS/wxPython-common-gtk2-unicode-2.6.3.2-1_py2.4.i686.rpm
http://www.magiclinux.org/people/haulm/RPMS/wxPython2.6-devel-gtk2-unicode-2.6.3.2-1_py2.4.i686.rpm
http://www.magiclinux.org/people/haulm/RPMS/wxPython2.6-gtk2-unicode-2.6.3.2-1_py2.4.i686.rpm
多出来的菜单到 /usr/share/applnk/Development 删除文件。
KDE
发表于 2006-6-25 07:36:26
http://www.magiclinux.org/people/haulm/RPMS/wxPython-common-gtk2-unicode-2.6.3.2-1_py2.4.i686.rpm
http://www.magiclinux.org/people/haulm/RPMS/wxPython2.6-devel-gtk2-unicode-2.6.3.2-1_py2.4.i686.rpm
http://www.magiclinux.org/people/haulm/RPMS/wxPython2.6-gtk2-unicode-2.6.3.2-1_py2.4.i686.rpm
多出来的菜单到 /usr/share/applnk/Development 删除文件。
你应该在打包的时候删掉多余的菜单。
haulm
发表于 2006-6-25 07:45:03
好吧,我重新打包。。。。,可空间又上不去了,将就用吧。
。。。。
http://lib.verycd.com/2006/03/30/0000096539.html