473,507 Members | 3,706 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GUI woes

Howdy,

This may not belong here, if so apologies...

I'm a python newbie, but have completed a console app that I'd like to run
under X. Reading recent postings here, wxpython seemed a reasonable choice so
under debian sid, I installed (via apt-get) the various wxpython stuff
available.:

libwxgtk2.4-python
libwxgtk2.5.3-python
python-opengl
python-pythoncard
python2.1-opengl
python2.2-opengl
python2.3-opengl
python2.3-pythoncard
pythoncard
pythoncard-doc
pythoncard-tools
wx2.5-examples
wxpython2.5.3
wxwin2.4-examples

test.py crashes with the error below. Any clues?

===========

Running test.py:

Traceback (most recent call last):
File "./test.py", line 87, in ?
app = MyApp(0) # Create an instance of the application class
File "/usr/lib/python2.3/site-packages/wxPython/wx.py", line 1951, in
__init__
_wxStart(self.OnInit)
File "./test.py", line 76, in OnInit
frame = MyFrame(None, -1, "This is a test")
File "./test.py", line 26, in __init__
self.Bind(wx.EVT_SIZE, self.OnSize)
AttributeError: MyFrame instance has no attribute 'Bind'
Jul 19 '05 #1
5 1288
The Great jeff elkins uttered these words on 4/23/2005 5:45 PM:
test.py crashes with the error below. Any clues?

===========

Running test.py:

Traceback (most recent call last):
File "./test.py", line 87, in ?
app = MyApp(0) # Create an instance of the application class
File "/usr/lib/python2.3/site-packages/wxPython/wx.py", line 1951, in
__init__
_wxStart(self.OnInit)
File "./test.py", line 76, in OnInit
frame = MyFrame(None, -1, "This is a test")
File "./test.py", line 26, in __init__
self.Bind(wx.EVT_SIZE, self.OnSize)
AttributeError: MyFrame instance has no attribute 'Bind'


Jeff - Could you please post your code?

From what you have posted it looks like your MyFrame class does not
inherit from wx.Frame.

Your class should be defined like this:
class MyFrame(wx.Frame):
def __init__(self, parent, id, title, pos, size, style):
wx.Frame.__init__(self, parent, id, title, pos, size, style)
self.Bind(wx.EVT_SIZE, self.OnSize)
self.Show(True)

Thanks,
-Kartic
Jul 19 '05 #2
"jeff elkins" <je********@earthlink.net> wrote in message news:ma**************************************@pyth on.org...
under debian sid, I installed (via apt-get) the various wxpython stuff
available.:

libwxgtk2.4-python
libwxgtk2.5.3-python
python-opengl
python-pythoncard
python2.1-opengl
python2.2-opengl
python2.3-opengl
python2.3-pythoncard
pythoncard
pythoncard-doc
pythoncard-tools
wx2.5-examples
wxpython2.5.3
wxwin2.4-examples
You have a mixture of different versions of wxPython in there.
AttributeError: MyFrame instance has no attribute 'Bind'


Bind was introduced in wxPython 2.5. Looks like you are
running against thr 2.4 library.

Roger
Jul 19 '05 #3
On Sunday 24 April 2005 03:11 am, Roger Binns wrote:
"jeff elkins" <je********@earthlink.net> wrote in message
news:ma**************************************@pyth on.org...
under debian sid, I installed (via apt-get) the various wxpython stuff
available.:

libwxgtk2.4-python
libwxgtk2.5.3-python
python-opengl
python-pythoncard
python2.1-opengl
python2.2-opengl
python2.3-opengl
python2.3-pythoncard
pythoncard
pythoncard-doc
pythoncard-tools
wx2.5-examples
wxpython2.5.3
wxwin2.4-examples


You have a mixture of different versions of wxPython in there.
AttributeError: MyFrame instance has no attribute 'Bind'


Bind was introduced in wxPython 2.5. Looks like you are
running against thr 2.4 library.

Roger


Thanks. I'll see if I can delete/reinstall and fix things.
Jul 19 '05 #4
On Sunday 24 April 2005 02:07 am, Kartic wrote:

Jeff - Could you please post your code?

From what you have posted it looks like your MyFrame class does not
inherit from wx.Frame.


Thanks Kartic. That test.py was from the wxpython download site.
Jul 19 '05 #5
On Sunday 24 April 2005 10:41 am, jeff elkins wrote:
On Sunday 24 April 2005 03:11 am, Roger Binns wrote:
You have a mixture of different versions of wxPython in there.
Thanks. I'll see if I can delete/reinstall and fix things.


Fixed and thanks for the clue :)

Jeff

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2941
by: Martin the Mac Addict | last post by:
Good evening to the skilled Ladies and Gentlemen of the PHP world. I am fairly new to all of this but learning quickly. I have run in to a need to remove blank lines from a form submission after...
7
1705
by: Mark | last post by:
O, woe is me, to have seen what I have seen, see what I see! (That's Shakespeare for those who were wondering what I'm on about) I am "having fun" with cookies. And I wonder if I have...
0
1501
by: Cedric | last post by:
This is a 3 weeks old problem, but having found a solution (and having looked for one here, finding only this message), I'm replying now. From: Jive (someone@microsoft.com) Subject: Upgrade...
3
3439
by: Angel Cat | last post by:
Trying to get my jobs to send mail when job fails. Should be easy but it's giving me headache Had a whole slew of issues. Outlook is installed with a n outlook mail profile set up that can...
2
1818
by: Andrew Thompson | last post by:
- NN 4.78 rendering woes, links at far left - I am trying to rework an old site, make it valid html and css, improving the x-browser and 'older browser' compatibility. My efforts so far, have...
0
2070
by: Arun Bhalla | last post by:
I'm having some inconsistency problems with my deployment project ("Setup") and its custom actions ("Installer"). I'm using Visual Studio .NET 2003 (.NET 1.1, no service pack) on Windows XPSP1. ...
9
1540
by: Mark Rae | last post by:
Hi, This time, I'm looking for a regular expression which says "the string must contain exactly seven or exactly eight digits" e.g. 123456 fails 1234567 passes 12345678 passes 123456789...
1
1873
by: hdogg | last post by:
Scope Woes - IF statement nested in WHILE statement -PHP I have an array $actuals_sum. <?php while(conditions) { if($i == '24) {
4
2865
by: =?Utf-8?B?VkIgSm9ubmll?= | last post by:
I am at my witless end here, please help! I have an ASP.Net aspx web page, hosted on Windows Server 2003, that receives a query string with the path to an autocad drawing file selected from a...
1
1384
by: Mike Howarth | last post by:
I've been having a few problems with connecting to SQL Server, initially I was using dblib however found some problems with returning text fields whereby all text fields were ignored and it bawked...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.