1 # PyOpenSG is (C) Copyright 2005-2009 by Allen Bierbaum
3 # This file is part of PyOpenSG.
5 # PyOpenSG is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation; either version 2 of the License, or (at your option)
10 # PyOpenSG is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # Init file for osg package.
22 # Hack to bring in all symbols OpenSG is linked against and loads from plugins
23 # Search for : setdlopenflags and RTLD_GLOBAL on google to see why
25 original_dlopen_flags
= None
29 original_dlopen_flags
= sys
.getdlopenflags()
30 sys
.setdlopenflags(original_dlopen_flags | dl
.RTLD_GLOBAL
)
34 # Import everything from the opensg module
35 from ${PROJECT_NAME}Py
import *
37 if original_dlopen_flags
:
38 sys
.setdlopenflags(original_dlopen_flags
)
40 def _fc_cmp(self
, other
):
41 """ Comparison operator for field containers. """
45 id_self
= self
.getId()
47 id_other
= other
.getId()
49 return cmp(id_self
, id_other
)
57 for (n
,c
) in OSGBasePy
.__dict
__.iteritems():
58 if isinstance(c
,type) and (${PROJECT_NAME}Py
.AttachmentContainer
in c
.__mro
__):