wxPython unter Ubuntu 6.06 dapper
Verfasst: Samstag 23. Dezember 2006, 15:46
Hallo,
Ich wollte mal wxPython ausprobieren, da sich dieses Toolkit sehr gut anhört.
Python 2.4 ist unter Ubuntu standardmässig installiert, ich hab mir noch IDLE dazu geholt und hab auch die repositorys für wxpython eingebunden und die pakete installiert, die laut der wxpython seite nötig sind um mit wxpython zu arbeiten.
Hab nun versucht folgenden Code mit IDLE auszufürhen:
Doch anstatt, das ich n Hallo Welt formular zu sehen bekomme, bekomm ich nur diese Fehlermeldung:
Traceback (most recent call last):
File "/home/luke86/Python/Test/wx.py", line 4, in ?
import wx
File "/home/luke86/Python/Test/wx.py", line 6, in ?
class MainWindow(wx.Frame):
AttributeError: 'module' object has no attribute 'Frame'
Ich hoffe jemand kann mir hier weiterhelfen
mfg
luke86
Ich wollte mal wxPython ausprobieren, da sich dieses Toolkit sehr gut anhört.
Python 2.4 ist unter Ubuntu standardmässig installiert, ich hab mir noch IDLE dazu geholt und hab auch die repositorys für wxpython eingebunden und die pakete installiert, die laut der wxpython seite nötig sind um mit wxpython zu arbeiten.
Hab nun versucht folgenden Code mit IDLE auszufürhen:
Code: Alles auswählen
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
import wx
class MainWindow(wx.Frame):
def __init__(self, parent = None, id = -1, title = "Small Editor"):
wx.Frame.__init__(
self, parent, id, title, size = (400, 200),
style = wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE
)
self.control = wx.TextCtrl(self, -1, style = wx.TE_MULTILINE)
self.Show(True)
app = wx.PySimpleApp()
frame = MainWindow()
app.MainLoop()
Traceback (most recent call last):
File "/home/luke86/Python/Test/wx.py", line 4, in ?
import wx
File "/home/luke86/Python/Test/wx.py", line 6, in ?
class MainWindow(wx.Frame):
AttributeError: 'module' object has no attribute 'Frame'
Ich hoffe jemand kann mir hier weiterhelfen

mfg
luke86