but I got this error on wxPython2.9.3.1 version
Traceback (most recent call last):
File "/usr/local/src/eclipse_1.4/plugins/
org.python.pydev.debug_2.3.0.2011121518/pysrc/pydevd.py", line 1307,
in <module>
debugger.run(setup['file'], None, None)
File "/usr/local/src/eclipse_1.4/plugins/
org.python.pydev.debug_2.3.0.2011121518/pysrc/pydevd.py", line 1060,
in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "/home/choiwonjun/workspace/wxPython/PENOLA_20120106/test/
wx_example/test6.py", line 7, in <module>
from wx import *
File "/usr/local/lib/python2.7/dist-packages/wx-2.9.3-gtk2/wx/
glcanvas.py", line 8, in <module>
import _glcanvas
ImportError: /usr/local/lib/python2.7/dist-packages/wx-2.9.3-gtk2/wx/
_glcanvas.so: undefined symbol: _ZTI14wxEventFunctor
from wx import *
from wx.glcanvas import wxGLCanvas
from wxPython.wx import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
from OpenGL.GL import *
import sys,math
> from wx import * > from wx.glcanvas import wxGLCanvas > from wxPython.wx import * > from OpenGL.GLUT import * > from OpenGL.GLU import * > from OpenGL.GL import * > import sys,math
> Wonjun, Choi
A general comment for you that may, or may not, have a bearing on your problem, the above is VERY bad practice, in general you should try to avoid the from package import * and are asking for problems if you use it more than once in any given module, this is because you are avoiding using namespaces which means that if the various packages that you are importing everything from without the package name qualifier have objects or methods with the same names then the last one imported will take the place of the other(s). If you find that you are having to do too much typing then you are better off using the import package as shortname syntax so that all of your imported classes and methods are name qualified. The double import of wx both as name qualified and as an unqualified is especially horrible and probably nearly doubles your start-up time.
It makes for much more readable code and less error prone code to always use external packages from within a namespace.
On Mon, 16 Jan 2012 09:13:50 +0100, 최원준 <wonjunchoi...@gmail.com> wrote: > does anyone know how to run this demo?
That demo is very old, and it uses mixed spaces and tabs for indentation... instead of fixing it I salvaged the relevant OpenGL parts and used them with my glutton library.
Things like this usually mean that the wx that was used at compile time (C++ headers and libraries) is not the same one being used (via the dynamic linker) at run time.
File "/home/workspace/wxPython/test/sphere.py", line 7, in <module> from glutton import canvas, presets File "/home/workspace/wxPython/test/glutton/canvas.py", line 32, in <module> import wx.glcanvas File "/usr/local/lib/python2.7/dist-packages/wx/glcanvas.py", line 8, in <module> import _glcanvas ImportError: /usr/local/lib/python2.7/dist-packages/wx/_glcanvas.so: undefined symbol: _ZTI14wxEventFunctor
On Tue, 17 Jan 2012 00:57:12 +0100, 최원준 <wonjunchoi...@gmail.com> wrote: > there is also error though I use glutton module.
> File "/home/workspace/wxPython/test/sphere.py", line 7, in <module> > from glutton import canvas, presets > File "/home/workspace/wxPython/test/glutton/canvas.py", line 32, in > <module> > import wx.glcanvas > File "/usr/local/lib/python2.7/dist-packages/wx/glcanvas.py", line 8, in > <module> > import _glcanvas > ImportError: /usr/local/lib/python2.7/dist-packages/wx/_glcanvas.so: > undefined symbol: _ZTI14wxEventFunctor
glutton uses glcanvas, so you get the same error as before when you failed to import it.
Am I right to assume that you are trying to use wx binaries you compiled yourself? If so you probably didn't do something right there, or as Robin suggested you have some other wx binaries that are somehow getting in the way.
Hey! -- This looks very cool. Do you have a written description of it anywhere? intent, use case examples, etc? At a glance, it kind of looks like an OpenGL version of FloatCanvas -- which would be very nice.
-Chris
--
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
On Wed, 18 Jan 2012 00:14:16 +0100, Chris Barker <chris.bar...@noaa.gov> wrote: > On Mon, Jan 16, 2012 at 12:55 AM, Toni Ruža <gmr....@gmail.com> wrote: >> you can get glutton from >> https://bitbucket.org/raz/glutton
> Hey! -- This looks very cool.
Thanks, I'm glad you like it.
> Do you have a written description of it > anywhere? intent, use case examples, etc? At a glance, it kind of > looks like an OpenGL version of FloatCanvas -- which would be very > nice.
It was recently born out of my refactoring a mapping application I am making for a client and a desire to test out a particular initialization method idea (see how the Canvas mixins are initialized if you are interested).
It is usable as it is for it's basic purpose but many of the things I imagined for it are still missing. The most important of which are classes for managing the contents of a vbo, interruptible rendering, efficient ttf glyph renderer, tiled raster backgrounds, classes for basic shapes and a layered 2d scene graph. And of course, if it were to compete with FloatCanvas some coordinate system transformation code should be in there too.
There is no documentation yet, only the few use case examples (the test_* files). If you feel like playing with it I would be glad to answer questions and discuss the implementation.
On Thu, 19 Jan 2012 09:00:56 +0100, 최원준 <wonjunchoi...@gmail.com> wrote: > can I run this in wx2.9 version? I could run this in wx2.8 version but > wx2.9.
2.9 was used to make it. It should also work with 2.8 but I didn't test it.
I notice this is in /usr/local/lib. Is it possible you have multiple Python installations on your disk, and they are getting confused?
That name is the typinfo entry for wxEventFunctor, and is present in libwx_baseu-2.9.so. Why don't you double-check that all of the libwx files are present where you expect?
-- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.
On Tue, Jan 17, 2012 at 10:54 PM, Toni Ruža <gmr....@gmail.com> wrote: >>> you can get glutton from >>> https://bitbucket.org/raz/glutton > Thanks, I'm glad you like it. > It was recently born out of my refactoring a mapping application I am making > for a client and a desire to test out a particular initialization method > idea (see how the Canvas mixins are initialized if you are interested).
Mapping? you're kidding! We're working on a wxPython/ PyOpenGL based mapping lib/application as well -- we really should talk. It's in a bit of a mess now, but here is an older version:
> It is usable as it is for it's basic purpose but many of the things I > imagined for it are still missing. The most important of which are classes > for managing the contents of a vbo, interruptible rendering, efficient ttf > glyph renderer, tiled raster backgrounds, classes for basic shapes and a > layered 2d scene graph.
All nice stuff to have, of course!
> And of course, if it were to compete with > FloatCanvas some coordinate system transformation code should be in there > too.
There is nothing now? How do you do mapping without any coordinate transformation?
Anyway, the stuff is FloatCanvas is a bit too limited anyway. In MapRoom, we are using pyproj for full map projection suport, and GDAL/OGR for geo-spatial data set support.
We do have a tiled mapp implementation there, though it only points to tiles that are self-generated so far.
> There is no documentation yet, only the few use case examples (the test_* > files). If you feel like playing with it I would be glad to answer questions > and discuss the implementation.
I'll try to take a look, yes. There could be a great opportunity for collaboration here.
-Chris
--
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
On Thu, 19 Jan 2012 21:20:56 +0100, Chris Barker <chris.bar...@noaa.gov> wrote: > Mapping? you're kidding! We're working on a wxPython/ PyOpenGL based > mapping lib/application as well -- we really should talk. It's in a > bit of a mess now, but here is an older version:
As it happens I just stumbled on to this recently and glanced at what it does and how it does it.
Didn't make it run though, just browsed the code a bit and made a mental note to come back to it someday.
>> It is usable as it is for it's basic purpose but many of the things I >> imagined for it are still missing. The most important of which are classes >> for managing the contents of a vbo, interruptible rendering, efficient ttf >> glyph renderer, tiled raster backgrounds, classes for basic shapes and a >> layered 2d scene graph.
> All nice stuff to have, of course!
>> And of course, if it were to compete with >> FloatCanvas some coordinate system transformation code should be in there >> too.
> There is nothing now? How do you do mapping without any coordinate > transformation?
It's for land surveyors, the areas are small and they work in a state mandated Cartesian-like system. I'm just offsetting coordinates to avoid huge numbers that would mess with OpenGL's 32 bit float accuracy. Coordinates they use look like this:
Units are in meters and the first few digits of x and y have some special meaning about the placement of the coordinate system on the earth.
> Anyway, the stuff is FloatCanvas is a bit too limited anyway. In > MapRoom, we are using pyproj for full map projection suport, and > GDAL/OGR for geo-spatial data set support.
Just found out about pyproj recently, I will almost certainly want to use it too.
> We do have a tiled mapp implementation there, though it only points to > tiles that are self-generated so far.
>> There is no documentation yet, only the few use case examples (the test_* >> files). If you feel like playing with it I would be glad to answer questions >> and discuss the implementation.
> I'll try to take a look, yes. There could be a great opportunity for > collaboration here.
The projects are similar yet it seems we focused on different areas. The things I focused on are largely connected to making nice COGO automations and UI, easy print layout and dynamically generating the shape geometry based on the scale of the map, shape attributes and a topographic key.
It's a bit of a one-man-army situation here and I wouldn't mind collaboration at all... :)
Hopefully we can merge our efforts into something that is closer to the ambitious end result.
최원준 wrote: > >I notice this is in /usr/local/lib. Is it possible you have multiple > Python installations on your disk, and they are getting confused?
> >That name is the typinfo entry for wxEventFunctor, and is present in > libwx_baseu-2.9.so <http://libwx_baseu-2.9.so/>. Why don't you > double-check that all of the libwx files >are present where you expect?
So, clearly we have the opportunity for confusion here, since you have both Python 2 and Python 3. baseu-2.9.so should be a symlink to one of the two builds (Python 2 and Python 3). Your _glcanvas.so was linking to "baseu-2.9.so", without a version, although it was in the Python 2.7 library directory. Can you show an "ls -l" so we can see the symlinks?
-- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.