summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
authorJulien Olivain2013-02-18 16:01:46 -0500
committerTom Rondeau2013-02-18 16:01:46 -0500
commitd2e8ec96084a26127907fe1cee2f15871d67b60d (patch)
tree49a18a97f837d0775208f85f2620577ee479dcfe /grc
parentddc3e4a478e716fbe64113d67e74ffec55beac8e (diff)
downloadgnuradio-d2e8ec96084a26127907fe1cee2f15871d67b60d.tar.gz
gnuradio-d2e8ec96084a26127907fe1cee2f15871d67b60d.tar.bz2
gnuradio-d2e8ec96084a26127907fe1cee2f15871d67b60d.zip
GRC: adds ability for grc to pull in documentation for blocks from other GR modules.
Diffstat (limited to 'grc')
-rw-r--r--grc/python/extract_docs.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/grc/python/extract_docs.py b/grc/python/extract_docs.py
index a7e945c37..33c404362 100644
--- a/grc/python/extract_docs.py
+++ b/grc/python/extract_docs.py
@@ -31,7 +31,13 @@ def _extract(key):
module_name, constructor_name = key.split('_', 1)
module = __import__('gnuradio.'+module_name)
module = getattr(module, module_name)
- except: return ''
+ except ImportError:
+ try:
+ module_name, constructor_name = key.split('_', 1)
+ module = __import__(module_name)
+ except: return ''
+ except:
+ return ''
pattern = constructor_name.replace('_', '_*').replace('x', '\w')
pattern_matcher = re.compile('^%s\w*$'%pattern)
matches = filter(lambda x: pattern_matcher.match(x), dir(module))