On 01/12/06, Prabhu Ramachandran <[EMAIL PROTECTED]> wrote: > Angus> and then does nothing. There is a hint of an attempt to > Angus> create a window after the second line is printed, but it's > Angus> destroyed very quickly. > >> Hmm, this is very strange. Can you please try the following:
[snip] > >> 2. Can you run pyface/examples/scene.py and > >> pyface/examples/dscene.py > > Angus> Yes it runs, but not correctly. Same outcome as for the > Angus> itvtk window, with garbage printed in the top-left > Angus> corner. Exiting via the menu worked okay though. > > IIUC, resizing the window has no effect, right? > > Can you try this: > > cd tvtk/examples/plugin > python test.py > > See if this starts up fine. Then try to open a new TVTK window by > File->New->VTK Scene. > > If this does not work, the best way to find a fix is to use the > pyface/examples/scene.py as a test case, then edit > pyface/tvtk/scene.py the _create_control(...) method is the one which > will need some hacking and experiment with a few print statements > there to see where things are going wrong. > > I'm unable to reproduce this on my machines (2 linux boxen with nVidia > cards and one Mac OSX box) which is why I can't do much more than > this. > > cheers, > prabhu > > Eureka! I finally solved the problem, and this may be worth noting for others' benefit. From your hints, I started using ipython to run dig into the internals and find short code snippets that would create the windows for me, and isolated the problem from there. Since I couldn't make much sense of the envisage code, in the plugin/test.py example, I switched back to the problem with the ivtk example in the tvtk/examples directory. Ultimately running the three lines: from enthought.tvtk.tools import ivtk ivtk.IVTKWithBrowser().open() # works okay ivtk.IVTKWithCrustAndBrowser().open() # throws up the weird window led me to think that the problem might be with the shell, since that's the difference between these two cases. I've had set ipython to run by default at startup, using: $PYTHONSTARTUP=$HOME/.pythonrc where .pythonrc is import IPython IPython.Shell.IPShell().mainloop(sys_exit=1) as listed in the ipython manual, (pdf page 67). However, this is the cause of the problem, and removing that startup file fixed the problem. It would appear that the threading behaviour of ipython and the shell(?) in mayavi2 was the problem. Now that we know, there isn't a problem for me per se, but it might be helpful to build in a check for this somehow. Thanks for your help Prabhu. Without those hints on where to look I'd have been completely stuck. Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland Secretary, Fencing North Inc. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ MayaVi-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mayavi-users
