2 Oct 2005 05:52
[SPAM] Re: [Envisage-dev] Wierd VTK/wxPython behavior under Linux
Prabhu, >Now, if I change the order of imports and import pyface before I >import traits, i.e. in the following order. > > from enthought.pyface import GUI > from enthought.tvtk.tools import ivtk > >Then everything works. Alternatively, if I use a cvs build of VTK >then things work without changing the import order. I suspect a clash >in the libraries that are imported but the error and the solution are >really wierd. > >Has anyone run into an error like this before? > > While I haven't ever seen this specific error before, I think I know what the problem is. In wx 2.6, fonts (and other things such as colors) are not available until a wx.App object is created. This caused us fits in things like Envisage and Traits UI. We (martin and i) went around and around trying to figure out how to make this work. In the end, we decided to just create a bogus wx.App object in Pyface. It looks like the built version of tvtk tries to get a font from wx, but that fails because the App object is not up yet. If you import Pyface first, you get our hack. In CVS they may have fixed the code to acquire the font after import (not during import). Does this make sense?(Continue reading)
One possibility for mathtext is to actually build the ft2font module
from source. You probably should be doing this anyways.
You might want to separate out the deleting from the building, since I'm
sure that most times you want to build_inplace, you don't want to build
everything. A build_clean.bat which knows to delete .pyd's from every
directory except mathtext would probably be fine.
build_inplace.bat always was and always will be a hack. You can't make
it worse, and there isn't much point in trying to make it better. If you
want a non-hack, just do a regular build/install.
RSS Feed