diff options
Diffstat (limited to 'gnuradio-runtime/python/pmt')
-rw-r--r-- | gnuradio-runtime/python/pmt/__init__.py | 10 | ||||
-rwxr-xr-x | gnuradio-runtime/python/pmt/qa_pmt.py | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gnuradio-runtime/python/pmt/__init__.py b/gnuradio-runtime/python/pmt/__init__.py index bc933e80a5..0d995c24a4 100644 --- a/gnuradio-runtime/python/pmt/__init__.py +++ b/gnuradio-runtime/python/pmt/__init__.py @@ -25,7 +25,15 @@ The GNU Radio Utility Etcetera Library's Polymorphic Types for Python. ''' -from pmt_swig import * +import os + +try: + from pmt_swig import * +except ImportError: + dirname, filename = os.path.split(os.path.abspath(__file__)) + __path__.append(os.path.join(dirname, "..", "..", "swig")) + from pmt_swig import * + from pmt_to_python import pmt_to_python as to_python from pmt_to_python import python_to_pmt as to_pmt diff --git a/gnuradio-runtime/python/pmt/qa_pmt.py b/gnuradio-runtime/python/pmt/qa_pmt.py index 75e112678b..2a72fa6089 100755 --- a/gnuradio-runtime/python/pmt/qa_pmt.py +++ b/gnuradio-runtime/python/pmt/qa_pmt.py @@ -21,7 +21,7 @@ # import unittest -import pmt_swig as pmt +import pmt class test_pmt(unittest.TestCase): |