X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Fpython%2Fgnuradio%2Fgr%2F__init__.py;h=6f939c470d30b3f5fb284e50b98c3a5df2ee176b;hb=ea29b08aeb54227e6628f655ccfdb96fe4d8c378;hp=60e547c36c55e306dc1071fd004a8e399cbe51af;hpb=09a1e803a9e6587c78d20cdf16891e5295874668;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/python/gnuradio/gr/__init__.py b/gnuradio-core/src/python/gnuradio/gr/__init__.py index 60e547c3..6f939c47 100644 --- a/gnuradio-core/src/python/gnuradio/gr/__init__.py +++ b/gnuradio-core/src/python/gnuradio/gr/__init__.py @@ -1,5 +1,5 @@ # -# Copyright 2003,2004,2006 Free Software Foundation, Inc. +# Copyright 2003,2004,2006,2008,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -24,12 +24,29 @@ # This is the main GNU Radio python module. # We pull the swig output and the other modules into the gnuradio.gr namespace +# Temporary workaround for ticket:181. +# Use leading underscores to avoid namespace pollution +import sys +_RTLD_GLOBAL = 0 +try: + from dl import RTLD_GLOBAL as _RTLD_GLOBAL +except ImportError: + try: + from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL + except ImportError: + pass + +if _RTLD_GLOBAL != 0: + _dlopenflags = sys.getdlopenflags() + sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL) + from gnuradio_swig_python import * -from basic_flow_graph import * -from flow_graph import * from exceptions import * -from hier_block import * +from hier_block2 import * +from top_block import * +if _RTLD_GLOBAL != 0: + sys.setdlopenflags(_dlopenflags) # Restore original flags # create a couple of aliases serial_to_parallel = stream_to_vector @@ -38,3 +55,12 @@ parallel_to_serial = vector_to_stream # Force the preference database to be initialized from prefs import prefs +#alias old gr_add_vXX and gr_multiply_vXX +add_vcc = add_cc +add_vff = add_ff +add_vii = add_ii +add_vss = add_ss +multiply_vcc = multiply_cc +multiply_vff = multiply_ff +multiply_vii = multiply_ii +multiply_vss = multiply_ss