[visionegg] Re: VisionEgg with wxPython on Windows

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Wed, 02 Nov 2005 11:42:15 -0800

Hi Simeon,

I'm also no Windows whiz, but trying the simple program below results in no problems for me... Have you been able to track yours down any further? What do you think may be different between your setup and mine?

Here's what check-config.py says:

Python version 2.4.2 (OK)
extra Python info: (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
Numeric version 23.8 (OK)
PyOpenGL (package "OpenGL") version 2.0.2.01 (OK)
pygame version 1.7.1release (OK)
Python Imaging Library (package "Image") version 1.1.5 (OK)

Here's the program that works for me:

import wx

import VisionEgg
VisionEgg.start_default_logging(); VisionEgg.watch_exceptions()

from VisionEgg.Core import *
from VisionEgg.FlowControl import Presentation
from VisionEgg.Gratings import *

app = wx.PySimpleApp()
frame = wx.Frame(None, -1, "Hello World")
frame.Show(1)
app.MainLoop()

screen = Screen()

stimulus = SinGrating2D(position = ( screen.size[0]/2.0, screen.size[1]/2.0 ),
anchor = 'center',
size = ( 300.0 , 300.0 ),
spatial_freq = 10.0 / screen.size[0], # units of cycles/pixel
temporal_freq_hz = 1.0,
orientation = 45.0 )


viewport = Viewport( screen=screen, stimuli=[stimulus] )

p = Presentation(go_duration=(5.0,'seconds'),viewports=[viewport])
p.go()

Simeon Fitch wrote:

Has anyone been able to display a wxPython GUI before getting the default VisionEgg/pygame screen on Windows?

I have a wxPython setup GUI that appears before the experiment, which works fine on MacOS X, but on windows pygame crashes (segmentation fault). It crashes in Core.py, line 304, which is the call to "pygame.display.set_mode()". If I disable the wxPython GUI it runs fine.

I'm not really a windows programmer (unix geek), so any hints, tips, anecdotes, etc. on how to hunt this one down would be appreciated.

Many thanks,

Simeon Fitch

--
Simeon H.K. Fitch, Owner
Mustard Seed Software
1634 Brandywine Drive
Charlottesville, VA 22901
210.867.1616



====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html

Other related posts: