> Something is very wrong with my wxPython installation. I'm on Gentoo linux, and I get this:
>
> sib@Elend ~ $ python
> Python 2.5.2 (r252:60911, Nov 1 2008, 12:05:29)
> [GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import wx
>>>> wx.__version__
>>>>
> '2.8.9.1'
>
>>>> app = wx.App()
>>>> rect1 = wx.Rect(0, 50, 10, 100)
>>>> rect2 = wx.Rect(0, 25, 50, 200)
>>>> wx.IntersectRect(rect1, rect2)
>>>>
> Speicherzugriffsfehler
> sib@Elend ~ $
>
...
>
Maybe I missed it, but what's the problem? Is there no error (i.e.
traceback)? I don't recommend trying to create the GUI in the
interpreter. Create it in your favorite text editor instead and then run
it. Otherwise you may see some goofy things, especially if you're using
the Tkinter IDLE.
The problem: I don't think Python should crash with "Speicherzugriffsfehler" (what's the right english term? Translation would be "memory access error") after a call to wx.IntersectRect(rect1, rect2). No traceback because of this crash.
I wouldn't try to create a real application in the interpreter, this was a test. I didn't use IDLE but called the interpreter from the terminal.
I first got this crash in a Dabo application and finally localized it with the help of a Dabo developer to a call to wx.IntersectRect(). It only seems to happen on my Gentoo machine, so I most probably have misconfigured something. I hope somebody using Gentoo can tell me what it might be.
Sibylle
···
nulla.epistola@web.de wrote:
--
Keine Signatur
__________________________________________________________________
"Run, Fatboy, Run" sowie "Rails & Ties" kostenlos anschauen!
Blockbuster-Gutscheine sichern unter http://www.blockbuster.web.de
I suspect your example is hiding something. When you call wx.App() with
no parameters, it tries to redirect stdout and stderr to a window.
wx.IntersectRect returns a rectangle, which it then tries to print. As
one additional data point, can you try this:
app = wx.App(0) # note the parameter "0" here to leave stdout
connected to terminal
rect1 = wx.Rect( 0, 50, 10, 100 )
rect2 = wx.Rect( 0, 25, 50, 200 )
wx.IntersectRect( rect1, rect2 )
If it still crashes, then that says the trouble really is in the
IntersectRect call.
···
nulla.epistola@web.de wrote:
nulla.epistola@web.de wrote:
Something is very wrong with my wxPython installation. I'm on Gentoo linux, and I get this:
sib@Elend ~ $ python
Python 2.5.2 (r252:60911, Nov 1 2008, 12:05:29)
[GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import wx
wx.__version__
'2.8.9.1'
app = wx.App()
rect1 = wx.Rect(0, 50, 10, 100)
rect2 = wx.Rect(0, 25, 50, 200)
wx.IntersectRect(rect1, rect2)
Speicherzugriffsfehler
sib@Elend ~ $
The problem: I don't think Python should crash with "Speicherzugriffsfehler" (what's the right english term? Translation would be "memory access error") after a call to wx.IntersectRect(rect1, rect2). No traceback because of this crash.
I wouldn't try to create a real application in the interpreter, this was a test. I didn't use IDLE but called the interpreter from the terminal.
I first got this crash in a Dabo application and finally localized it with the help of a Dabo developer to a call to wx.IntersectRect(). It only seems to happen on my Gentoo machine, so I most probably have misconfigured something. I hope somebody using Gentoo can tell me what it might be.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Tim Roberts wrote:
I suspect your example is hiding something. When you call wx.App() with
no parameters, it tries to redirect stdout and stderr to a window.
It only does this on Windows and Mac, not on Linux.
Paul