__init__.py
Go to the documentation of this file.
00001 #### Python package 'rviz' initialization.
00002 #
00003 # The actual implementations are defined in C++ and wrapped by
00004 # shiboken or sip.  This wrapper finds which binding is available and
00005 # presents it as package rviz.
00006 
00007 import sys
00008 import roslib; roslib.load_manifest('rviz')
00009 
00010 # Can use the following setattr() call to force one binding or the other.
00011 # setattr(sys, 'SELECT_QT_BINDING', 'pyside')
00012 
00013 from python_qt_binding.QtBindingHelper import QT_BINDING
00014 
00015 if QT_BINDING == 'pyside':
00016 
00017     # Import the shared library generated by the shiboken binding-generator.
00018     # This depends on rviz/manifest.xml listing ${prefix}/lib in the python path.
00019     import librviz_shiboken
00020 
00021     # Expose the contained rviz namespace directly
00022     sys.modules['rviz'] = librviz_shiboken.rviz
00023 
00024     print "Using PySide and shiboken for rviz python bindings."
00025 
00026 elif QT_BINDING == 'pyqt':
00027 
00028     # Import the shared library generated by the sip binding-generator.
00029     # This depends on rviz/manifest.xml listing ${prefix}/lib in the python path.
00030     import librviz_sip
00031 
00032     # Expose the contained rviz namespace directly
00033     sys.modules['rviz'] = librviz_sip.rviz
00034 
00035     print "Using PyQt and sip for rviz python bindings."
00036 
00037 else:
00038     raise ImportError('Qt binding name "%s" is unknown.' % QT_BINDING)


rviz
Author(s): Dave Hershberger, Josh Faust
autogenerated on Mon Jan 6 2014 11:54:32